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

SOFTDEVICE:INVALID MEMROY ACCESS, the softdevice has conflicts with the temperature sensor on-chip??

Hi, all.

I'm in trouble in solving a question when i learned NRF52832 recentlly.(SD s132, V5.0, SDK15.0)

I want to read the temperature data from the sensor on-chip and send it to my phone by bluetooth.

But once the code ran to "temp_read" function, the code would ran to "__WEAK void app_error_fault_handler(uint32_t id, uint32_t pc, uint32_t info)",and then got stuck in

"NRF_BREAKPOINT_COND".

What interesting is, everything was ok when i annotated the code which related to "temperature".So i wonder if  i forgot to set  something so that there're some conflicts between softdevice and "temperature_read" moudle?

I totally got crazy about this, if anyone have suggestions?Please help me

thanks a lot

Parents
  • Hello,

    TEMP is one of the peripherals which the Softdevice reserves access to (Hardware peripherals), and that is why you will get a memory access assertion if you try to access it directly (i.e. write to TEMP registers) while the Softdevice is enabled. Instead you have to read the temperature via the Softdevice's  sd_temp_get() function.

     

  • Hi,

    Thank you very much for your answer, sincerely. 

    But i met another question. Hope for your opinion.

    As said above, i want send something through "sd_ble_gatts_hvx" function , but i found i couldn't send a single "1" or "0".

    Here  some details: I want to use "data_upload_immediate" to make it.  But after  downloading the code, the attribute value in NRF CONNECT is very strange, like  “0x0B”  in the below picture, or other value like"0x09" ....., not "0"and"1".

    So i think it  didn't succeed. 

    I guess i set the wrong "conn_handle" in the "data_upload_immediate",  but  in fact, i didn't know how to set it or use it

    should i set it as "BLE_CONN_HANDLE_ALL", or other value??

    And if there're any other reasons to cause the failure? any suggestiongs would be ok. thanks.

    Best Regards,

    Jerryxu

Reply
  • Hi,

    Thank you very much for your answer, sincerely. 

    But i met another question. Hope for your opinion.

    As said above, i want send something through "sd_ble_gatts_hvx" function , but i found i couldn't send a single "1" or "0".

    Here  some details: I want to use "data_upload_immediate" to make it.  But after  downloading the code, the attribute value in NRF CONNECT is very strange, like  “0x0B”  in the below picture, or other value like"0x09" ....., not "0"and"1".

    So i think it  didn't succeed. 

    I guess i set the wrong "conn_handle" in the "data_upload_immediate",  but  in fact, i didn't know how to set it or use it

    should i set it as "BLE_CONN_HANDLE_ALL", or other value??

    And if there're any other reasons to cause the failure? any suggestiongs would be ok. thanks.

    Best Regards,

    Jerryxu

Children
Related