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 Reply Children
  • 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

  • Hi Hakon,

    I have built and run the project that reads the die temperature. I can see the see the temperature values going up and down as I heat and cool the device. However, I am still not clear how to read these values from the network core into my application. 

    Please advise.

    Kind regards

    Mohamed

  • Hi,

     

    Here's a small example on how to share data between the two cores.

    Note that I setup the network core to use RTT for printing, and the app core uses uart.

    share_temp_data_nrf5340.zip

     

    The above example uses linker sections to share the RAM mapped shared address space, and it is provided as-is.

    You can have a look at these samples, if you need to share data between the cores as a part of a larger scheme:

    https://github.com/nrfconnect/sdk-nrf/tree/master/samples/nrf_rpc/entropy_nrf53

    https://github.com/nrfconnect/sdk-zephyr/tree/master/samples/bluetooth/hci_rpmsg

     

    Kind regards,

    Håkon

  • Thank you Hakon.

    I have just seen your reply. I have been checking my inbox for a notification email from DevZone informing me you've updated my ticket. However, for some reason I did not get a notification despite the fact Notifications are enabled.

    Anyway, I will have a look at your example and let you know how I got on.

    Kind regards

    Mohamed

  • Hi Mohamed,

     

    Learner said:
    I have just seen your reply. I have been checking my inbox for a notification email from DevZone informing me you've updated my ticket. However, for some reason I did not get a notification despite the fact Notifications are enabled.

    Could you check if the notification is ticked under "settings -> notifications"? Specifically this one?

     

    Learner said:
    Anyway, I will have a look at your example and let you know how I got on.

    as mentioned, it is a very simplistic example, which statically declares a region of RAM, and the network core essentially writes into this RAM address based on when the IPC event occurs. It does not have much error handling wrt. synchronizing.

     

    Kind regards

    Håkon

Related