This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Issue with SDK 13.1.0 Power management

Hi there,

I have nRF52840-Preview-DK eval board. I have downloaded the “SDK 13.1.0”. I was trying out the power management example under the folder “..\nRF5-SDK_copy\nRF5-SDK\examples\peripheral\pwr_mgmt\” on IAR. This example doesn’t work out of the box. Do I need to change anything there?

I tried the \hex\nrf_pwr_mgmt_pca10056.hex and it works fine giving the outputs at the UART on PuTTY. But even after rebuilding/compiling the .hex created in the folder “..\nRF5-SDK_copy\nRF5-SDK\examples\peripheral\pwr_mgmt\pca10056\blank\iar_build” doesn’t work.

Please let me know what to do or what to change to make it work. I couldn't find any help pointer on this anywhere.

Thanks

Parents
  • I was able to get the “pwr_mgmt” example working in IAR in SDK 13.1.0. I ran the debugger and found out that the application was getting stuck in the loop within the function “nrf_delay_us()” which is in the file “nrf_delay.h” under the “components” folder of the SDK files. The function, nrf_delay_us(), is written in assembly language, and for some reason, was not generating the correct code when built with IAR v.8.11. There are two other file that I had to replace as well. Here are the details as follows.

    1. Download SDK 12.3.0 and extract all the files into a folder where you keep nRF5 SDKs.
    2. Replace the following three files in SDK v.13.1.0 from the corresponding files in SDK v.12.3.0.
    3. Replace the file “nrf_delay.h” in the path, “\components\drivers_nrf\delay\”, with the same file from the corresponding path in SDK 12.3.0.
    4. Replace the file “retarget.c” in the path, “\components\libraries\uart\” with the same file from the corresponding path in SDK 12.3.0.
    5. Replace the file “port.c” in the path ““\external\freertos\portable\IAR\nrf52\” with the same file from the corresponding path in SDK 12.3.0. NOTE: This will fix an issue of getting warning messages if you are using FreeRTOS, and are getting these warnings when building an SDK example project that uses FreeRTOS.
    6. Next rebuild all the files for the pwr_mgmt project and test it.
Reply
  • I was able to get the “pwr_mgmt” example working in IAR in SDK 13.1.0. I ran the debugger and found out that the application was getting stuck in the loop within the function “nrf_delay_us()” which is in the file “nrf_delay.h” under the “components” folder of the SDK files. The function, nrf_delay_us(), is written in assembly language, and for some reason, was not generating the correct code when built with IAR v.8.11. There are two other file that I had to replace as well. Here are the details as follows.

    1. Download SDK 12.3.0 and extract all the files into a folder where you keep nRF5 SDKs.
    2. Replace the following three files in SDK v.13.1.0 from the corresponding files in SDK v.12.3.0.
    3. Replace the file “nrf_delay.h” in the path, “\components\drivers_nrf\delay\”, with the same file from the corresponding path in SDK 12.3.0.
    4. Replace the file “retarget.c” in the path, “\components\libraries\uart\” with the same file from the corresponding path in SDK 12.3.0.
    5. Replace the file “port.c” in the path ““\external\freertos\portable\IAR\nrf52\” with the same file from the corresponding path in SDK 12.3.0. NOTE: This will fix an issue of getting warning messages if you are using FreeRTOS, and are getting these warnings when building an SDK example project that uses FreeRTOS.
    6. Next rebuild all the files for the pwr_mgmt project and test it.
Children
No Data
Related