This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Zephyr API to read the nRF5340 die temperature

Hello,

I am looking for some some nRF5340 example code that reads the nRF5340 die temperature using zephyr APIs.

I've looked at previous posts but I could only find this one https://devzone.nordicsemi.com/f/nordic-q-a/56171/how-to-get-die-temperature-on-nrf52832-using-zephyr from 10 months ago that stated none existed. I am hoping someone, somewhere musty have done something similar.

Thank you.

Kind regards

Parents
  • Hi,

     

    The temp peripheral is only accessible on the network core:

    https://infocenter.nordicsemi.com/topic/ps_nrf5340/temp.html?cp=3_0_0_6_33

    So we need to configure the board nrf5340pdk_nrf5340_cpunet, but since the network core is started from the app cpu, you first need to have something on the app core running with this config set:

    CONFIG_BOARD_ENABLE_CPUNET=y

     

    I used sample/nrf5340/empty_app_core.

     

    For uart output from the network core, connect P0.25 to P0.20.

    If you also need UART RXD, connect P0.26 to P0.22.

     

    Here's an example that shows how to use the NRF_TEMP peripheral: 

    0677.nrf_temp_sample.zip

     

    Kind regards,

    Håkon

  • Hi Hakon,

    Thank you for your reply and apologies for taking this long to act on it. I was working on another project but now I am back on the die temperature after few months.

    So, if I understand you right, I need to do the following:

    1- Add CONFIG_BOARD_ENABLE_CPUNET=y to my .overlay file nrf5340pdk_nrf5340_cpuapp.overlay

    2- Build the application for board nrf5340pdk_nrf5340_cpuapp - Flash it into the app core.

    3- Build the die temperature project separately for board nrf5340pdk_nrf5340_cpunet using nrf5340pdk_nrf5340_cpunet.overlay -  - Flash it into the network core.

    What I am not sure about is how to get the die temperature value which is computed on the network core into the application?

    How do I connect P0.25 to P0.20?

    If you also need UART RXD, connect P0.26 to P0.22.

    How do I know if I need this or not?

    Thank you.

    Kind regards

    Mohamed

Reply
  • Hi Hakon,

    Thank you for your reply and apologies for taking this long to act on it. I was working on another project but now I am back on the die temperature after few months.

    So, if I understand you right, I need to do the following:

    1- Add CONFIG_BOARD_ENABLE_CPUNET=y to my .overlay file nrf5340pdk_nrf5340_cpuapp.overlay

    2- Build the application for board nrf5340pdk_nrf5340_cpuapp - Flash it into the app core.

    3- Build the die temperature project separately for board nrf5340pdk_nrf5340_cpunet using nrf5340pdk_nrf5340_cpunet.overlay -  - Flash it into the network core.

    What I am not sure about is how to get the die temperature value which is computed on the network core into the application?

    How do I connect P0.25 to P0.20?

    If you also need UART RXD, connect P0.26 to P0.22.

    How do I know if I need this or not?

    Thank you.

    Kind regards

    Mohamed

Children
No Data
Related