Dear all,
I took the FreeRTOS Wireless UART BLE example from the SDK as the base for a project. First, instead of starting the system with the "startup_task", I start the system with a task that serves as a command-line interface (CLI) to query the board via UART on PC.
After that, I turn on the BLE with a command by the CLI (this command starts the "startup_task" in the same way as it is in the raw example but with some things commented, like the SerialManager init because it is already initialized, etc.).
Next, I switch BLE off with another command (destroying all tasks, queues, events, etc. and de-initializing the things I see I can do so). The problem comes when I turn BLE on again; the problem is located in the AppMain.c file in the if condition:
/* BLE Host Stack Init */if (Ble_Initialize(App_GenericCallback) != gBleSuccess_c){panic(0,0,0,0);return;}
Solved! Go to Solution.
Hi,
An easy way is to use the software reset. You needn't care anything using this method. Use the function 'ResetMCU'. This function is in file 'Reset.c'
If your data should be kept whatever the mcu's status is, you can try to save the data into flexnvm.
Hi,
An easy way is to use the software reset. You needn't care anything using this method. Use the function 'ResetMCU'. This function is in file 'Reset.c'
If your data should be kept whatever the mcu's status is, you can try to save the data into flexnvm.
Thanks,
As FRDM KW41Z does not have a FlexNVM or driver in the SDK, I see I have to use the functions available in the fsl_flash.c file (https://community.nxp.com/t5/Wireless-Connectivity/FRDM-KW41Z-d-flash-read-write-FlexNVM/m-p/930780)
Is there any example for the KW41Z in the SDK where data is stored and read in the Flash memory using the functions from fsl_flsh.c file? I can't find any.
If not, could you provide a short example of how to do this? I have seen that the NVM start address is stored at NV_STORAGE_START_ADDRESS_C in the linker file.
Hi,
You can refer the kw41's pFlash example. Write your data into the free flash.