Having trouble with X-Nucleo-NFC03A1 and Nucleo-F413ZH
Hello,
I am working with X-Cube-NFC3 (V2.0.0) for source code. Using one of the projects built for F401RE, I setup a project wherein:
- I mapped each pin according to various User manuals
- To test the pinout mapping, I wrote a simple code to check if User LEDs were mapped correctly. They are.
- I added the middlewares into the project from the folder inside X-Cube-NFC3 (V2.0.0)
- I added the BSP drivers for the F401RE into my project.
I now used the Ready projects to create some dummy code. I got the code built but all I get is that my board is not initialized. Check out my source code and my output:
/* USER CODE BEGIN 2 */
/* Initialize log module */
// __HAL_SPI_CLEAR_OVRFLAG(&hspi1);
logUsartInit(&huart2);
platformLog("\r\nWelcome to X-NUCLEO-NFC03A1 (SPI Interface)\r\n");
/* Initalize RFAL */
rfalAnalogConfigInitialize();
if(rfalAnalogConfigIsReady() == 1)
{
platformLog("rfalAnalogConfigIsReady\r\n");
}
else if(rfalAnalogConfigIsReady() == 0)
{
platformLog("Not rfalAnalogConfigIsReady\r\n");
}
ErrorVariable = rfalInitialize();
platformLog("Error Code: %u\r\n", ErrorVariable);
if( ErrorVariable != ERR_NONE )
{
/*
* in case the rfal initalization failed signal it by flashing all LED
* and stoping all operations
*/
platformLog("RFAL initialization failed..\r\n");
while(1)
{
platformLedToogle(PLATFORM_LED_A_PORT, PLATFORM_LED_A_PIN);
platformLedToogle(PLATFORM_LED_B_PORT, PLATFORM_LED_B_PIN);
platformLedToogle(PLATFORM_LED_F_PORT, PLATFORM_LED_F_PIN);
platformLedToogle(PLATFORM_LED_V_PORT, PLATFORM_LED_V_PIN);
platformDelay(100);
}
}
else
{
platformLog("RFAL initialization succeeded..\r\n");
for (int i = 0; i < 6; i++)
{
platformLedToogle(PLATFORM_LED_A_PORT, PLATFORM_LED_A_PIN);
platformLedToogle(PLATFORM_LED_B_PORT, PLATFORM_LED_B_PIN);
platformLedToogle(PLATFORM_LED_F_PORT, PLATFORM_LED_F_PIN);
platformLedToogle(PLATFORM_LED_V_PORT, PLATFORM_LED_V_PIN);
platformDelay(200);
}
platformLedOff(PLATFORM_LED_A_PORT, PLATFORM_LED_A_PIN);
platformLedOff(PLATFORM_LED_B_PORT, PLATFORM_LED_B_PIN);
platformLedOff(PLATFORM_LED_F_PORT, PLATFORM_LED_F_PIN);
platformLedOff(PLATFORM_LED_V_PORT, PLATFORM_LED_V_PIN);
}The output I got was:
Welcome to X-NUCLEO-NFC03A1 (SPI Interface)<CR><LF>
rfalAnalogConfigIsReady<CR><LF>
Init failed<CR><LF>
Error Code: 8<CR><LF>
RFAL initialization failed..<CR><LF>
The error code 8 corresponds to SystemError. Could someone help me out with how to proceed. I did make the following changes to the Middlewares:
- I removed the call to the #include "rfal_dpoTbl.h" as this file did not exist in the Middlewares folder.
- I also commented the following in rfal_dpo.c
//#ifndef RFAL_FEATURE_DPO
// #error " RFAL: Module configuration missing. Please enable/disable Dynamic Power module by setting: RFAL_FEATURE_DPO "
//#endif
Any and all help is useful.
