Visitor II
November 22, 2016
Question
STM32 and STPM33 weird SPI behaviour
- November 22, 2016
- 6 replies
- 2030 views
Posted on November 22, 2016 at 20:52
Hello,
I'm building a multi phase power meter with 6 pcs of STPM33 ICs and an STM32. The STPM33 chips are on the same SPI bus, with separate chip selects (SCS) for each meter. The MCU can control all of the control signals (SYN, ENABLE, SCS etc.. ). The meters are daisy chained together by the 16 MHz clock line, as the datasheet recommendation. The ''first'' meter has a 16 MHZ crystal, and using the internal oscillator. Now only the ''first'' chip is soldered to the board, just for testing purpose...I followed the recommended startup procedure for setting the SPI mode for the meter. The meters works with no problem, I can read out meaningful data. The problem:When I deselect the meter chip (SCS->H), the MISO line doesn't go to High Z state, still pulling the MISO line strongly. I connected the MISO line to the half supply voltage by a resistor divider to see on an oscillopscope if it's letting go the line, but no. I couldn't find any errata from the chip, now I have ran out of ideas, after hours of troubleshooting.According to this evalboard, STPM33, 34 can be connected to a single SPI bus. http://www.st.com/en/evaluation-tools/evalstpm3x-3ph.htmlI have a screenshot from a logic analyser from the startup sequence. I think it's like the recommended sequence. The SCS is low before the ENABLE pin goes high, and then there is the 3 SYN pulse, and finally the SCS pulse. There are enough delays for each state.What could be the problem? This is a very-very basic hw function...(Sorry if I'm not in the right topic, but couldn't find a better place) #stpm33