cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get ADC value on STM32N6570-DK

athern27
Associate III

 

Hi everyone,

I’m currently working with the STM32N6570-DK board and trying to read an analog signal using the  ADC1/2 INP8 channel (PB10) using the MB1280C Fanout board (Pin 13) with STMOD+ connector. However, I'm consistently getting a value around 2000 (high impedance value), regardless of whether I connect the pin to GND or a 1.8V source.

For reference, I’ve used similar code on the STM32F441-RE board where it works perfectly, so I suspect this might be related to board-specific settings.

Steps to Reproduce:

  1. Create a default STM32N6570-DK project using STM32CubeIDE.
  2. Set PB10 to ADC2_INP8 mode in the .ioc file.
  3. Keep the ADC settings at their default configuration (12-bit resolution).
  4. Add UART print statements to output the ADC values over the COM port (as shown in my main.c file).
  5. Observe that the ADC value remains around 2000, regardless of the input voltage on PB10 or Pin 13 on the fanout board connected to STMOD+ connector.

I’m attaching my full project for reference.

 

11 REPLIES 11

Thanks @RomainR. it worked like a charm. 
Can you please tell  RIFSC->RISC_SECCFGRx how the x register has been specified in the RM0486. Is it taken up from Table 20. Because in the header file how has it been written. A bit confusing if I have to enable for another Non-RIF aware peripheral.

virsa14_0-1749791268077.png

virsa14_2-1749791376312.png

 

virsa14_1-1749791285019.png

 

 

Hi @athern27 

RISUP needs to be configured to allow non-secure peripheral (here GPIO PB10) to access to secure peripheral (here ADC1)

RomainR_0-1749881653327.png

And the rules are as below:

RomainR_1-1749881712699.png

Best regards,

Romain,

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.