Let's read #BL602's Internal Temperature Sensor with Apache #NuttX OS
https://github.com/lupyuen/bl602_adc
#BL602's Internal Temperature Sensor is connected to the Analog-to-Digital Converter ... Which is NOT yet supported on #NuttX OS ... Let's port the ADC HAL from BL602 MCU SDK
https://nuttx.apache.org/docs/latest/platforms/risc-v/bl602/index.html
We copied 3 C Source Files from #BL602 MCU SDK to #NuttX OS ... Plus a bunch of Header Files ... To make BL602 ADC work on NuttX
Some parts of #BL602 GLB HAL won't build nicely on #NuttX OS ... So we disable them out when compiling our ADC HAL
https://github.com/lupyuen/bl602_adc/blob/main/bl602_glb.h#L637-L667
To read #BL602's Internal Temperature on #NuttX OS, we call the ADC HAL like so
https://github.com/lupyuen/bl602_adc_test/blob/main/bl602_adc_test_main.c#L49-L111
#BL602 Internal Temperature reads OK on #NuttX OS! 🎉 Though a little cold for Super Sunny Singapore 😂
https://github.com/lupyuen/bl602_adc_test#output-log
QOTO: Question Others to Teach Ourselves An inclusive, Academic Freedom, instance All cultures welcome. Hate speech and harassment strictly forbidden.
Some parts of #BL602 GLB HAL won't build nicely on #NuttX OS ... So we disable them out when compiling our ADC HAL
https://github.com/lupyuen/bl602_adc/blob/main/bl602_glb.h#L637-L667