cancel
Showing results for 
Search instead for 
Did you mean: 

ADC is weird too...

WQ
Associate III

It is a quick learning project of LL driver programming on NUCLEO-L432KC. First I got a bug in MX configuration. It was fixed by ST:

https://community.st.com/s/question/0D53W00002BCrfpSAD/the-simplest-and-most-basic-ll-driver-app-doesnt-work

I then went through UART, Timer, GPIO/EXTI, RTC, I2C/SPI, etc. and got to DAC for the ADC. I got weird DAC outputs:

https://community.st.com/s/question/0D53W00002C0fs9SAB/dac-outputs-are-weird-

Anyway, I moved onto ADC which is the last thing to test in this project. It has 5 channels, ch0 VREFINT, ch10 and ch11 analog, ch17 TS and ch18 VBAT. These channels are selectable in software. They can run on a single or multiple channels in continuous and multiple loop conversion. The data is DMA transferred.

First, the internal temperature didn't look not right. I had to work on this single channel mostly in a single channel mode. The TS equation in user's manual (page 446, RM0394) was not right. I referenced the WB55's equation and got it work. I then checked VREFINT and VBAT channels. They looked all right. ch0 VREFINT is important to get accurate VDDA which is the VREF+ of the ADC module.

0693W00000aJRpFQAW.jpgNext, it was the multiple channels and continuous conversion. The output of DAC1 is feeding to CH10 input. Again, the DAC outputs are weird as I posted yesterday. But they are steady and stable. Their values are hand marked in the following picture:

0693W00000aJS9cQAG.jpgWe can see that Ch10 ADC is very accurate to DAC's output voltages. The problem is the internal TS channel. Its values are either way low (0.041V) or high (2.6/2.9V). They are no way to near 0.7V for 29C degree. The VBAT channel is also moved high incorrectly. Its 1.2xx values indicate VBAT is more than 3.6V. Only ch0 looks OK with the single channel measurement (still moved slightly higher).

What do yo think? is there anyway to work around as you know? Maybe it was just a bad luck as I got defect MCU whose analog parts were kind of related.

Any help is appreciated. -wq

1 REPLY 1
WQ
Associate III

I just found the RTC was probably wrong. First, I found it became 2-5 seconds slower for just less than 1 hour running. I then tried to correct by writing a time to RTC. It failed with error. it didn't happed before (fail to write). I disabled the ADC and DAC modules, RTC seemed back to normal (not slow, be able to write).

I think the defect of the L432 MCU is serious. DAC and ADC not working properly are obvious to observe. It affects others also which are not so easy to know they are already bad.

The PCB is marked "MB1180 Rev C" with a small white stick "L432KC". It is very difficult to read the marks on the top of the MCU chip. We bought them from Digikey (USA) in January this year. I hope ST can tell us what we do with these boards.

Meanwhile, we move to NUCLEO-L452RE.

-wq