Problem description:
USART2 has no output to the PC.
Potential problems:
1. USART2_BRR = 0x00000138
At Baud rate 115200, we can calculate the clock freq of USART2 is running at 35.9424MHZ (odd!)
and for USART2, the input clock to the peripheral is PCLK1
-read the PCLK1 freq
While running the program, the returning result is 36MHZ.
ACTUAL PROBLEM:
After searching the Internet for days, and tried different codes. I eventually find out the problem is from the DB9 female wire.
As you can see from the image below, my dev kit has two male DB9 connectors, in order to connect it to the USB to RS232 connector, I need a wire with female connector on both side.
This is what female heads looks like:
So for this specific dev kit, it requires female DB9 head to interchange the 2 and 3 pin.
Basically this is how 9 pins on each side is connected:
1-1 2-3 3-2 4-4 5-5 6-6 7-7 8-8 9-9
dam




No comments:
Post a Comment