0

ok guys, this is probably one of the most stupid things I have gotten stuck at so far but I have a problem.

I have an STM32F103VCT6 mcu, and I am trying to communicate over USART1, thats PA09 and PA10. Tx line sends just fine to connected FTDI chip and all appears well on the computer terminal.

The problem is that the Rx IT on the stm wont fire when FTDI sends data.

Rx line PA10 is configured as GPIO_Mode_IN_FLOATING.

I have tried to change voltage levels of chip, still nothing.

The really funny thing is, if I connect the Rx and Tx of the stm, the interrupt works just fine.

If I connect the Rx line of the the stm to any other point on the board, it fires no problem (reading rubbish of course, but at least I know my firmware works)

I have stm, ftdi and computer all connected to common grounds so that shouldnt be an issue.

I have also confirmed a million times that my jumper cables are in good shape and nothing is broken.

Bottom line is I know its an electric problem that I just cant get my head around ... its just one of those days/things, so if anyone has struggled with the same issue or something similar please let me know how you solved this !!

Thanks alot guys

a.atlam
  • 742
  • 5
  • 17
  • You probably need an oscilloscope to debug the issue. – leppie Jul 05 '14 at 01:59
  • 1
    "the Rx IT on the stm wont fire when FTDI sends data" -- are you sure it's actually sending data? Even if interrupts won't fire, can you try receiving it by polling? Have you plugged an oscilloscope and verified that the FTDI chip is actually sending data that can be seen with the oscilloscope? If everything you described is correct, then I'd wager a fair amount of money that the FTDI is not sending data at all. – swineone Jul 05 '14 at 05:07
  • Well I don't have an oscilloscope available right now, but I have connected the Rx to the Tx line of the ftdi chip and it works on the terminal no problem. Everything echos ... I even connected a tiny LED to the Tx line of the ftdi and it blinks ... so I guess the chip is working ... I think I shall disassemble the whole project and reconnect everything just to make sure all connections are right and shall give feed back – a.atlam Jul 05 '14 at 21:15
  • Reconnected the whole thing, nothing works. I even tried the FTDI with a netduino board that was lying around and it worked very well. – a.atlam Jul 07 '14 at 13:41
  • Hey, you might have contention on the PA9 & PA10 lines. If this is an eval-board you are using, then you need to look at that specific board's User Manual (e.g. [STM3240G-EVAL](http://www.st.com/web/en/resource/technical/document/user_manual/DM00036746.pdf), and search for "PA9" and "PA10". There should be an "Alternate Function" section, describing potential alternate functions, and which resistors/pieces to disconnect or de-solder in order to use them for each purpose. I had this problem while trying to use SPI lines on an STM32F4 board. – bunkerdive Jul 07 '14 at 18:12
  • JSalazar Thank you very much !! this wasnt the case, but you pointed me to the direction that solved it. Turns out that the onboard ISP was connected to USART1 (I have a chines board so schematics we completely messed up, so confirmed pin connection with ohm-meter) ... so, while it was no problem sending from the MCU, the current from the external FTDI chip was drained at the ISP IC and never reached the MCU, thats why when I used a larger source, (say the 3.3V pin) it did the job and triggered the USART IT ... I think that wraps it up !! Thanks alot Guys !! – a.atlam Jul 08 '14 at 00:57

0 Answers0