2013-06-25 02:00 AM
Hello all,
I am trying to make the chip to communicate with the PC. My code did not work and I want to debug the code. But I cannot control what happens when data is received. In the debug mode, the code never enters in the interrupt handler. How can I see what does the program do when it receives data from the PC?Thanks a lot in advance.Best regards,Gunay #usart #debug #interrupt #iar2013-06-25 05:08 AM
this is the part of the schematic which shows RS422 connections of the board.
-- I removed the schematic to prevent any trouble. I think clive1 and fm have seen it and found no problems (:I do not think there is a problem with these because it is a part of a well working board, at least it used to work well (: Is it possible to damage it with the code?2013-06-25 06:38 AM
this is the part of the schematic which shows RS422 connections of the board.
In theory, there is no problem, since PA8 and PA9 are denotes as 5V tolerant (assuming a F407). But I still don't get how you connect, for instance, RX+ and RX- on RS422 side to RX and GND on UART side. RS422 is differential, that means, RX+ to RX- is max. 10V. That would be too much for a GPIO input ...2013-06-25 07:02 AM
I think the transreceiver IC does that part. I mean I do not connect GPIO pins of the chip directly to the Rx+ and Rx- but there is this IC between them. It's a TI component written ''05C8L6K VP1793 G4'' on top of it but I could find no datasheet available on the internet.
2013-06-25 07:22 AM
Finally, the RX pin of the STM32 needs to see a signal according to the RS232 standard (on CMOS level), and according to the configuration parameters (baudrate, databits, stopbits, etc.) to receive anything.
I deem it rather essential that this is the case - and a scope is the best tool to check this.2013-06-25 07:41 AM
OK, I will test it with a scope tomorrow and post the results. But do you mean STM requires RS232, and its RS422 incompatible?
2013-06-25 08:02 AM
But do you mean STM requires RS232, and its RS422 incompatible?
The physical layer differs, i.e. the voltage levels on the line. Assuming otherwise identical parameters (baudrate, polarity, character settings), they are compatible. With proper level shifting, it should work.
2013-06-26 08:24 AM
Hello guys,
Today I used a scope and found out that the problem is a really silly one. Connector cable was connected wrong, after changing it, problem disappeared. I apologize for taking your time for such a mistake.Thank you so much for your help.Best regards.Günay2013-06-26 10:05 AM
Never mind.
One engineering rule learned: question everything, and check everything you did.