Zephyr - behavior difference between similar boards.

I have a board we created, loosely related to the nrf52840-DK, many parts are removed, but buttons and LEDs line up.

Some background.
I have been able to load simple blink programs and UART programs, and they execute without issue. The device runs code.

I compiled a blink program for zephyr, using a modified version of the .dts/dtsi files modified for our board specifics. 

On our board, I can load it and watch it start up in Ozone, but the code never executes the blink code. (the zephyr blinky project). I can see while single stepping in Ozone that the code is cycling through cpu_idle.S, jumping out into nrf_clock.h code and back to cpu_idle.S . The main program never gets executed. 
While Ozone is running, I stop the debugger session connected to my board , select Tools-Jlink settings and select the nrf82540-DK board.

I execute a download and reset and the code runs fine. main gets called.

This is the identical .elf file and on the -DK it works and on ours it SORTA works.

My question is, does zephyr detect or require some feature of the -DK board to operate? My first thought is that our board doesn't have the 32.768 crystal. Does the default zephyr build require this?

Sincerely,
Tony M.

Parents
  • Yeah, turns out that was it. I needed to add CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y to the project.
    Didn't realize.
    Edit:
    So, it seems that I was incorrect in my first assumption that CONFIG_CLOCK_CONTROL_NRF5_K32SRC_250PPM , somehow I added them and a build error occurred. Running grep on the total zephyr directory showed the values do exist. In any case the article should be valuable if you are running into a problem.
    Edit: and now I found the actual problem the variable is CONFIG_CLOCK_CONTROL_NRF_K32SRC_250PPM not CONFIG_CLOCK_CONTROL_NRF5_K32SRC_250PPM. Running Grep looking for 250PPM allowed me to see the variable I wanted to see, not the one that was actually there.

Reply
  • Yeah, turns out that was it. I needed to add CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y to the project.
    Didn't realize.
    Edit:
    So, it seems that I was incorrect in my first assumption that CONFIG_CLOCK_CONTROL_NRF5_K32SRC_250PPM , somehow I added them and a build error occurred. Running grep on the total zephyr directory showed the values do exist. In any case the article should be valuable if you are running into a problem.
    Edit: and now I found the actual problem the variable is CONFIG_CLOCK_CONTROL_NRF_K32SRC_250PPM not CONFIG_CLOCK_CONTROL_NRF5_K32SRC_250PPM. Running Grep looking for 250PPM allowed me to see the variable I wanted to see, not the one that was actually there.

Children
No Data
Related