Good morning, colleagues,
I wanted to ask you about a problem I have been having when using the FSI of a TMS320F28388D microcontroller.
I am testing the following example "fsi_ex1_loopback_cpucontrol.c" and it is the usual code for an External Loopback.
I have done a test with two breadboard cables connecting between GPIO27 (TX CLK) and GPIO9(RX CLK) and between GPIO26(TX D0) or GPIO8(RX D0). Here is a picture of the setup.
With this configuration I have managed to get the code to work properly when debugging at 50Mhz, 25MHz, etc... The rxEventSts is 2112(data frame) and 2624 (ping frame) that indicates the RX is receiving well the frames. The txEventsSts is 1 that means it is transmitting well.
However, for the application I want to develop I need to communicate via optical fibre, so I have used R-1624Z and R-2624Z transmitters and receivers respectively. The assembly I have done is with the same GPIOs but taking the TXCLK, RXD0, RXCLK, RXD0 color-wire with a flat cable to a board with the 2 transmitters and the two fibre optic receivers. The assembly is as shown.
Once I have checked that the connection is correct and I do the debug, I have had the following problems. If I configure the CLK of the FSI at 10MHz it works fine (FSI_PRESCALE_10MHZ).
However, when I increase the frequency to 25MHz I am confronted with the following:
- If I leave the code as it is by changing only the 25MHz prescaler I get RX INT2 jumped and the program stops. I see that the txEventSts is at 1 and therefore a send has been made but the rxEventSts is at 1, which means that the ping watchdog counter has been completed.
- If I comment out the lines "FSI_enableRxInterrupt(FSIRXA_BASE, FSI_INT2, FSI_RX_EVT_PING_WD_TIMEOUT);", "FSI_enableTxPingTimer(FSITXA_BASE, txPingTimeRefCntr, txPingFrameTag); "and "FSI_enableRxPingWatchdog(FSIRXA_BASE, rxWdTimeoutRefCntr);" so that it does not appear in the interrupt, now the error appears in the Main at the end of the while loop in ESTOP0 and txEventSts is 1 and rxEventSts is 0 so I don't know what could be happening when I do this.
So the maximum speed I could reach with fiber was 10MHz, and because of these errors. I would be very pleased if you could help with this issue.
However, I did another test, this time I did not use the flat cable and directly connected the coloured wires from the GPIOs to my fibre optic card connectors as shown below.
However, I did another test, this time I did not use the flat cable and directly connected the coloured wires from the GPIOs to my fibre optic card connectors as shown below. This test shows interesting things but I don't know what I can take from this. The important news is that by making this connection (exactly the same as the previous one but without the flat grey cable) 25MHz COMMUNICATION worked! (FSI_PRESCALE_25MHZ).
Nevertheless, I want to work at 50MHz (FSI_PRESCALE_50MHZ) and this is still not possible.
- As the code is (with the 50Mhz prescaler) even if I comment the lines "FSI_enableRxInterrupt(FSIRXA_BASE, FSI_INT2, FSI_RX_EVT_PING_WD_TIMEOUT);", "FSI_enableTxPingTimer(FSITXA_BASE, txPingTimeRefCntr, txPingFrameTag); "and "FSI_enableRxPingWatchdog(FSIRXA_BASE, rxWdTimeoutRefCntr);" or if I write false in bool variable "isRxFrameWdEnable" I have the following errors:
(The pictures are the same as showed above but is the same issue)
Basically is the error I obtained in the case with the flat grey cable when I commented the INT2 lines. But here appears whenever I comment it or not.
I would like to know if you could help me with this issue in order to obtain a speed of 50Mhz (these fibers can work with this speed until 120m) and what could be happening with this errors and if there is any parameter I could change in order to increase the time of the counters to avoid this errors of timing if are errors of timing (Im not sure if it's for this cause).
I will wait for your answer. Have a nice day.
BR,
Pedro