cancel
Showing results for 
Search instead for 
Did you mean: 

ADC issue STM32H723ZG with IHM08M1

evanpol
Associate II

Hi all,

I'm in the process of configuring my STM32H723ZG to work with the IHM08M1 motor driver shield.

Currently I am trying to configure and validate the signals from the ADCs however I am having some issues with this. One ADC I'm trying to validate is the DC voltage bus reading. This circuit simply places the input through a voltage divider with some protection, going straight to the ADC after. I've tried configuring these ADCs in a few different ways, single channel, DMA, etc. however none of them produce the expected results. 

What I'm currently seeing is that with the stm and shield disconnected, I can read the correct stepped down voltage on the shield side by probing with a multimeter (~0.5V depending on input voltage). When the stm is disconnected to the shield the ADC reads a floating ~1.64 volts. With the two connected the ADC seems to still be reading 'garbage' values, probing with a multimeter reads ~1.75 volts. The last bit of information I have is that by grabbing on to the ADC pin directly I am able to drive the signal to either 0V with ground or 3V3 with the stm's voltage source, and successfully read this in code.

 

I am relatively new to STM's so i appreciate you taking the time and effort to help me, any and all feedback is welcome.

Thanks

18 REPLIES 18
AScha.3
Super User

Hi,

just ...maybe helping, if you would reveal which connections you talk about:

AScha3_1-1761563886847.png

 

If you feel a post has answered your question, please click "Accept as Solution".

Hi AScha.3, 

Thank you for your reply. I am seeking help with all ADCs, the specifc one I am referring to is for voltage bus measurements, configured on pin PA1. It is located in the top middle portion of the image you sent me. Attached is the assisting circuitry for the input.

Thank you for your help.

 

Schematic diagram

Hi,

how did you connect to the H7 board ? (because its for morpho connector on nucleo64 boards fitted.)

AScha3_0-1761568001323.png

 

If you feel a post has answered your question, please click "Accept as Solution".
Hi,
I soldered two sets of header pins to the nucleo board to connect the
shield, ensuring that the pins specified in the motor drivers datasheet
lined up with those on the stm. This meant that the side with the buttons
on the nucleo was covered.

Ok,

so assuming you did it correct:

AScha3_0-1761570223727.png

...seems, your "A1" is then PC0 on the H7 /144 board. Try this as the analog Vin.

 

see in circuit...and check on which pins you come out on this board !

https://www.st.com/resource/en/schematic_pack/mb1364-h723zg-e01_schematic.pdf

 

If you feel a post has answered your question, please click "Accept as Solution".
Hi AScha.3,
I will test this soon, are you able to explain how you came to this? I
lined up the stm and shield such that the pins specified would be the same.
I.e. under the nucleo board, it says PA1 on the pin where I expect PA1 to
be on the shield.
Are you suggesting that this correlates to a different pin in software?

Hi AScha.3,

With the help of the schematic you linked I was able to realise that SB57 needed to be removed. PA1 now works correctly but I am still having some issues with the pins used for current sensing. I have configured them on PA0, PC0, and PC1 for phases U, V, and W respectively. If you have any insight as to what might be wrong I would greatly appreciate your assistance.

Thanks again!

Hello @evanpol,

To use PC1 for current sensing, remove SB64.

GMA_0-1761635748169.png

As a reminder, MCSDK supports only STM32H745ZI and STM32H755ZITx. STM32CubeMX version 6.14.0 or newer must be used, and the use of HAL drivers is mandatory.

If you agree with the answer, please accept it by clicking on 'Accept as solution'.
Best regards.
GMA

Hi @GMA,

Thank you for your help, I am using my own custom code to program the STM32H723ZG and control the IHM08M1, not MCSDK. Thank you for your comment regarding SB64, I have that solder bridge removed and have gone through the schematic ensuring that aren't any others that might be missed for the current sensor pins. I have configured the ADC properly now and am able to read a value, the value is floating and when I ground the pin or drive it to 3v3 I can see the respective correct ADC values. However when running my circuit I don't see any current feedback, and imagine that it should be floating closer to 0 instead of the middle of the ADC range, any help would be fantastic.

 

I tried looking at the BEMF measurements next, configured them all on PC3-C, PC4, and PC5. PC3-C looks like it worked straight away, spinning the motor by hand while disconnected to DC supply showed some voltage at the pin. However PC4 and PC5 were floating at the middle of the ADC range. I noted that in the schematic I may need to remove SB36 and SB29, I removed these and the behaviour seems odd? It's more or less the same but now reading for PC3-C also seems off, it doesn't change much when spinning the motor by hand and floats at an ADC value of ~2000.

 

Any help would be greatly appreciated.