Part Number:IWR6843AOPEVMOther Parts Discussed in Thread:IWR6843AOP
在官方提供的6843呼吸心跳demo C:\ti\mmwave_industrial_toolbox_4_8_0\labs\vital_signs\68xx_vital_signs 中,我发现mss程序中UART-1引脚设置如下:
#ifdef SOC_XWR68XX
Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINN5_PADBE, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);
Pinmux_Set_FuncSel(SOC_XWR68XX_PINN5_PADBE, SOC_XWR68XX_PINN5_PADBE_MSS_UARTA_TX);
Pinmux_Set_OverrideCtrl(SOC_XWR68XX_PINN4_PADBD, PINMUX_OUTEN_RETAIN_HW_CTRL, PINMUX_INPEN_RETAIN_HW_CTRL);
Pinmux_Set_FuncSel(SOC_XWR68XX_PINN4_PADBD, SOC_XWR68XX_PINN4_PADBD_MSS_UARTA_RX);
#endif
这个PINN4和PINN5我在IWR6843AOP芯片的管脚手册中并未找到,请问代码是不是有什么错误?
Nancy Wang:
请查看截图:
,
Xiao yang:
所以这个代码的管脚设置是不是不对???但是我似乎是可以跑起来的
,
Nancy Wang:
确实是不一样,以下帖子中有相关讨论:
https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/915813/iwr6843aop-pinmux-driver-for-6843aop
具体的解决方案我需要升级再问一下。
,
Xiao yang:
这个帖子似乎也没有结论,麻烦再帮忙问一下
,
Nancy Wang:
已私信给你,请查看。
,
Nancy Wang:
关注一下这个帖子。
e2e.ti.com/…/3916294
,
Nancy Wang:
请参考以下链接的FAQ:
e2e.ti.com/…/faq-awr6843aop-mmwave-sdk-pinmux-awr1843aop-and-awr6843aop
,
Xiao yang:
这个似乎和我说的问题并不一样啊?
,
Nancy Wang:
附件的 pinmux_xwr6843AOP.h 有下载下来看过吗?里面配置的管脚和datasheet对应起来了。
#define SOC_XWR6843AOP_PINE2_PADAJ_MSS_UARTA_RX 2U
#define SOC_XWR6843AOP_PIND3_PADAK_MSS_UARTA_TX 2U
,
Xiao yang:
抱歉啊,我之前没有细看,刚刚仔细看过了,我发现以下问题:pinmux_xwr6843AOP.h 和 C:\ti\mmwave_sdk_03_05_00_04\packages\ti\drivers\pinmux\include\pinmux_xwr68xx.h差别只是PIN的名称不同,宏定义数值和引脚有关功能相同,例如:
// pinmux_xwr6843AOP.h@name PINU16_PADBE#define SOC_XWR6843AOP_PINU16_PADBE 30U#define SOC_XWR6843AOP_PINU16_PADBE_GPIO_14 0U /*< General Purpose IO*/#define SOC_XWR6843AOP_PINU16_PADBE_RS232_TX 1U /*< Debug UART (Operates as Bus Master) – Receive Signal*/#define SOC_XWR6843AOP_PINU16_PADBE_MSS_UARTA_TX 5U /*< Master Subsystem – UART A Transmit*/#define SOC_XWR6843AOP_PINU16_PADBE_MSS_UARTB_TX 6U /*< Master Subsystem – UART B Transmit*/#define SOC_XWR6843AOP_PINU16_PADBE_BSS_UART_TX 7U /*< Debug UART Transmit [Radar Block]*/#define SOC_XWR6843AOP_PINU16_PADBE_CANFD_TX 10U /*< CAN FD (MCAN) Transmit Signal*/#define SOC_XWR6843AOP_PINU16_PADBE_I2C_SDA 11U /*< I2C Data */#define SOC_XWR6843AOP_PINU16_PADBE_EPWM1_A 12U /*< PWM Module 1 – OutPut A*/#define SOC_XWR6843AOP_PINU16_PADBE_EPWM1_B 13U /*< PWM Module 1 – OutPut B*/#define SOC_XWR6843AOP_PINU16_PADBE_NDMM_EN 14U /*< Debug Interface (Hardware In Loop) Enable – Active Low Signal*/#define SOC_XWR6843AOP_PINU16_PADBE_EPWM2_A 15U /*< PWM Module 2 – OutPut A*/
//pinmux_xwr68xx.h @name PINN5_PADBE#define SOC_XWR68XX_PINN5_PADBE 30U#define SOC_XWR68XX_PINN5_PADBE_GPIO_14 0U /*< General Purpose IO*/#define SOC_XWR68XX_PINN5_PADBE_RS232_TX 1U /*< Debug UART (Operates as Bus Master) – Receive Signal*/#define SOC_XWR68XX_PINN5_PADBE_MSS_UARTA_TX 5U /*< Master Subsystem – UART A Transmit*/#define SOC_XWR68XX_PINN5_PADBE_MSS_UARTB_TX 6U /*< Master Subsystem – UART B Transmit*/#define SOC_XWR68XX_PINN5_PADBE_BSS_UART_TX 7U /*< Debug UART Transmit [Radar Block]*/#define SOC_XWR68XX_PINN5_PADBE_CANFD_TX 10U /*< CAN FD (MCAN) Transmit Signal*/#define SOC_XWR68XX_PINN5_PADBE_I2C_SDA 11U /*< I2C Data */#define SOC_XWR68XX_PINN5_PADBE_EPWM1_A 12U /*< PWM Module 1 – OutPut A*/#define SOC_XWR68XX_PINN5_PADBE_EPWM1_B 13U /*< PWM Module 1 – OutPut B*/#define SOC_XWR68XX_PINN5_PADBE_NDMM_EN 14U /*< Debug Interface (Hardware In Loop) Enable – Active Low Signal*/#define SOC_XWR68XX_PINN5_PADBE_EPWM2_A 15U /*< PWM Module 2 – OutPut A*/
所以demo的代码中虽然写成了不存在的引脚,但是宏定义的值和正确引脚的值相同,所以能正确使用的原因是这个?
我可以继续使用原有的 C:\ti\mmwave_sdk_03_05_00_04\packages\ti\drivers\pinmux\include\pinmux_xwr68xx.h文件是吗??
,
Nancy Wang:
只要引脚功能配置正确就行了,最直接的查一下寄存器就知道了。
,
Xiao yang:
看了程序其实不是很懂底层的实现,有没有具体的资料可以参考的?
,
Nancy Wang:
详细的资料没看到,就是datasheet Table 7-1上面的内容,每个管脚的PINCNTL ADDRESS都列出来了。
mmwave_sdk_03_05_00_04\packages\ti\drivers\pinmux
,
Xiao yang:
好的谢谢
,
Nancy Wang:
不客气,我会将此贴关闭。