Part Number: AWR1843BOOST
Tool/software: Code Composer Studio
Hi everyone,
First, my code is shown below:
#include <stdint.h> #include <stdlib.h> #include <stddef.h> #include <string.h> #include <stdio.h> #include <math.h> #include <ti/drivers/soc/soc.h> #include <ti/drivers/esm/esm.h> #include <ti/drivers/gpio/gpio.h> #include <ti/drivers/pinmux/pinmux.h> #include <ti/common/sys_common.h> int main(void) { int32_t errCode; SOC_Handle socHandle; SOC_Cfg socCfg; /* Initialize the ESM: Don’t clear errors as TI RTOS does it */ ESM_init(0U); /* Initialize the SOC confiugration: */ memset ((void *)&socCfg, 0, sizeof(SOC_Cfg)); /* Populate the SOC configuration: */ socCfg.clockCfg = SOC_SysClock_INIT; socCfg.mpuCfg = SOC_MPUCfg_CONFIG; /* require to unhalt the DSS if this core is available in selected device */ socCfg.dssCfg = SOC_DSSCfg_UNHALT; /* Initialize the SOC Module: This is done as soon as the application is started * to ensure that the MPU is correctly configured.*/ socHandle = SOC_init (&socCfg, &errCode); if (socHandle == NULL) { return -1; } /* Configure GPIO */ GPIO_init (); GPIO_setConfig(SOC_XWR18XX_GPIO_2, GPIO_CFG_OUTPUT); GPIO_write (SOC_XWR18XX_GPIO_2, 1U); while(1) { } }
As you can see, in this code, the GPIO_setConfig(SOC_XWR18XX_GPIO_2, GPIO_CFG_OUTPUT); function is used for configuring GPIO and it works. In all the sample code that I have referred , however, I see that the functions Pinmux_Set_FuncSel() and Pinmux_Set_OverrideCtrl() are used. I trying to follow the sample code but it didn't work. Could you please clarify the different between GPIO_setConfig() and Pinmux_Set_FuncSel()?
In addition, in the code above, the BIOS_start() function is not used. I would like to know if BIOS is important in AWR1843 projects. Beside that, is it true that if we want to use BIOS_start() function, we have to comment out the ESM_init() function?
Thanks for your concern!