NRF522832 FreeRTOS can't start.

Hi everyone:

I developed an application based on freertos, but when I download it, I found it can not start, but when I use the RTT to connect my device, It worked.

The commend is

nrfutil settings generate --family NRF52 --application app.hex --application-version 0 --bootloader-version 0 --bl-settings-version 2 settings.hex
nrfjprog --eraseall -f NRF52
nrfjprog --program mbr_nrf52_2.4.1_mbr.hex --verify -f NRF52
nrfjprog --program nrf52832_xxaa_mbr.hex --verify -f NRF52
nrfjprog --program app.hex --verify -f NRF52
nrfjprog --program settings.hex --verify -f NRF52
nrfjprog --reset -f NRF52

SDK is 17.1.0.

Best regards,

Lurn.

Parents Reply Children
  • If you have a floating UART RX or CTS pin that is not connected to anything, and especially without pullup, then the application may crash before the log module is initialized. See if it reaches the main-loop in your project. If not, does it stop the same place every time, or does it vary? And if you disable the UART, does it still stop?

    BR,
    Edvin

  • OK, when I  delete this code nrf_drv_clock_lfclk_request(NULL);  My device started working normally.

    And when set the RX pin pullup, I no longer get gibberish data.

    So,I think it works fine weather enable the UART or not.

    but when I program MBR and application, the FreeRTOS didn't start scheduler.

    1. I only program application (address start 0x00), everthing looks ok, I can receive the data I send and rtt will show logs.

    2. I program MBR and application (address start 0x1000), logs looks ok before the code running to vTaskStartScheduler(), and then there was nothing, I can't receive anything, even if I keep sending data.

    BR,

    Lurn

  • Lurn_Z said:
    can't receive anything, even if I keep sending data.

    What data? How do you send it? UART? BLE? ESB?

    Does vTaskStartScheduler() return?

    Do any of your tasks actually start? Have you tried debugging? Does it hardfault (stop around 0xA60 in the callstack), or does it keep running, just with no log output?

  • Do any of your tasks actually start?

    Nope, the tasks not stat, and the vTaskStartScheduler() doesn't return.the debug session is running and not arrived the breakpoint.

    What data? How do you send it? UART? BLE? ESB?

    I use UART to send it, data is like abc...or something, just for test.

  • Lurn_Z said:
    can't receive anything, even if I keep sending data.

    So that is because your threads aren't started, right?

    It may be a bit too late, but do you really need FreeRTOS? 

    I don't know why it doesn't work from your screenshot. Can you please send the application?

    And you did program the MBR, right?

    Oh, did you change your clock configurations in your application to use the internal RC Oscillator instead of the external LFXTAL? Because your custom board didn't have an external LFXTAL, right?

    BR,

    Edvin

Related