Author Topic: Help! STM32 IO voltage problem.  (Read 4762 times)

0 Members and 1 Guest are viewing this topic.

Offline clarkzhTopic starter

  • Newbie
  • Posts: 9
Help! STM32 IO voltage problem.
« on: June 06, 2014, 08:07:54 am »
dear all.

I?need to  interface with a machine port( which internal i can not see) , i use stm32 m0 MCU IOs. in the soft ware. i configure:

      bidirectional data line( yellow wave) OD, and use 10k pull down resistor and a 10k pull up resistor.

      then i got the wave like this. the lower waves( MCU output ), higher(MCU in).

as you can see ,that the output wave become lower voltage.

the input, very strange .

     this cause the communication unstable.  as you can see in the right part of the oscolloscope. the MCU just can not output the wave.

     i think the problem may be the drive/ sink ability of my IOs. or the internal parts

should you please help me to solve this strange problem??

in the pictures, MCU output is in rectangle box. but input in circle.

thank you~~~
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10433
  • Country: nz
Re: Help! STM32 IO voltage problem.
« Reply #1 on: June 06, 2014, 08:11:24 am »
I'm not sure i understand you, but..

Are you are driving the output in open collector mode so the output can rest at half rail?
You need to make the last bit of digital data in every packet a zero, otherwise the output will be held low until the next bit.
« Last Edit: June 06, 2014, 08:20:23 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline clarkzhTopic starter

  • Newbie
  • Posts: 9
Re: Help! STM32 IO voltage problem.
« Reply #2 on: June 07, 2014, 01:13:38 am »
I'm not sure i understand you, but..

Are you are driving the output in open collector mode so the output can rest at half rail?
You need to make the last bit of digital data in every packet a zero, otherwise the output will be held low until the next bit.

thanks Psi,  yes i drive the output/input in open collector(or open drain)mode. and i am to make a zero for each package.  you are right. but my problem may not come from here.

the voltage of the input/output line( color yellow in my attached) is not good.  ?I?have low voltage( indicated by rectangular box) when set it at output line. and high when set it as input line.

I guess i have incorrect setting of my bidirectional line,  hardware, or firmware. I used both external pull up and pull down resistors. and open drain in the MCU io.

 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4239
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Help! STM32 IO voltage problem.
« Reply #3 on: June 07, 2014, 11:18:39 am »
MCU inputs have schmitt triggering, 0.5*Vdd is not really allowd be the hardware. Unless you can disable the schmitt triggering, you'l have troubles.
My best guess is to put the pin in analog mode.
 

Offline rob77

  • Super Contributor
  • ***
  • Posts: 2087
  • Country: sk
Re: Help! STM32 IO voltage problem.
« Reply #4 on: June 07, 2014, 12:27:11 pm »
why are you using pull-up and pull-down at the same time ? what kind of bus it is ? if it's plain logic level coupling then biasing to 1/2 of the supply rail is not a good idea.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Help! STM32 IO voltage problem.
« Reply #5 on: June 07, 2014, 01:54:35 pm »
-and i am to make a zero for each package. -

maybe it is a language thing but the above and others like that are impossible to understand. -not good- or - not working- has no meaning to others and carries no information.

instead, describe what you are trying to do, how you are doing it, and what problems you are having would be helpful.

after you have put it down on a piece of paper, show it to your mom or your brother or a roommate and see if they understand it - you have to assume that we have no knowledge about your project.
================================
https://dannyelectronics.wordpress.com/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf