Author Topic: PIC16 UART to Analog Devices MAX96706 GMSL Chip (SerDes) - comms issues  (Read 632 times)

0 Members and 1 Guest are viewing this topic.

Offline tbw2Topic starter

  • Contributor
  • Posts: 11
  • Country: gb
Trying to set up a pair of SerDes chips, specifically the Analog Devices MAX96705 and MAX96706 GMSL IC's.

MAX96706 https://www.analog.com/en/products/max96706.html

Hitting a brick wall with the comms. No response from the MAX96706 (Deserializer) via UART.

PIC is sending the following packet to the RX pin of the MAX96706;
0x79 // Sync Bit
0x91 // Device Address + Read Bit (address is
0x1E // Device ID register
0x01 // 1 Byte of data expected to be returned (specifically we should receive 01001010).

Baud rate selected is 115200.

Nothing is received back from the Deserializer (checked on scope).

Things tried:
-Ensuring PWDNB is pulled HI, enabling normal operation.
-Holding MS/HVEN down LO, setting Base Mode
-Checking Power Supplies are correct and working, 3v3, 1v8 Analog and 1v8 Digital.
-Tried swapping TX/RX
-Lower baud rate (9600)
-Removing Sync Byte (0x79)
-Changing Device address to 0x90, to write to IC.
-Device address is set by external pins ADD0-ADD3, all of which are internally pulled low, checked with DMM.

Have I interpreted the UART Frame correctly? (Fig21)?

(0x79) (0x91) (0x1E) (0x01) ........... Then listen for the ACK, right?
« Last Edit: July 24, 2023, 01:59:25 pm by tbw2 »
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6164
  • Country: es
What about I2CSEL pin?
Quote
Connect I2CSEL to IOVDD with a 30kΩ resistor to set high (I2C interface), or leave open to set low (UART interface)
Quote
UART Interface
The UART interface, compatible with all GMSL devices, sends commands from device to device through several UART packets.
Set I2CSEL = 0 to set the device to use UART protocol.

Finally ensure the packed is made correctly:
Quote
UART Timing
In base mode, the UART idles high (through a pullup resistor). Each GMSL-UART byte consists of a START bit, 8 data bits, an even-parity bit and a stop bit (Figure 20).
Keep the idle time between bytes of the same UART packet to less than 4 bit times.
The GMSL-UART protocol is listed in Figure 21. A write packet consists of a SYNC byte (Figure 22).
Device address byte, Starting register address byte, number of bytes to write, and the data bytes.
The slave device responds with an acknowledge byte (Figure 23) if the write was successful.
A Read packet consists of a SYNC byte, Device address byte, Starting register address byte, and number of bytes to read.
The slave device responds with an acknowledge byte and the read data bytes.

« Last Edit: July 25, 2023, 09:12:23 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: tbw2

Offline tbw2Topic starter

  • Contributor
  • Posts: 11
  • Country: gb
Thank you for the reply. The I2CSEL pin is pulled low internally, so should boot up in UART mode. Externally, it is connected to an LED (unlit).

Today I reflowed the IC, tried various other baud settings but still no responses.
I believe the chip is OK because the LOCK pin changes state after startup, alerting me that the GMSL link is not locked on.
Tomorrow i will try i2c communication. Implementing the MSSP module from MCC looks to be a non-starter as there is no provision for the Sync byte, so i will have to make my own driver… Not fun!

Edit:
The quote regarding UART packets - does that mean each byte I send needs an extra 3 bits adding?
I can’t just send the Sync byte, it needs the start, stop and parity bits adding? To make it 11bits?

Edit2:
I will try the following tomorrow;
[0b0 + 0x79 + 0b1 + 0b1] = Start + SYNC + Odd Parity + Stop
[0b0 + 0x91 + 0b1 + 0b1] = Start + Device Address + Odd Parity + Stop
[0b0 + 0x1E + 0b0 + 0b1] = Start + Device ID Register + Even Parity + Stop
[0b0 + 0x01 + 0b1 + 0b1] = Start + Register Width + Odd Parity + Stop

Thank you @DavidAlfa you have been a big help.
« Last Edit: July 25, 2023, 09:45:26 pm by tbw2 »
 

Offline DavidAlfa

  • Super Contributor
  • ***
  • Posts: 6164
  • Country: es
To my undertanding, yes! Though I've never used that device.
Check the software development kit, will probably be useful!

https://www.analog.com/en/design-center/evaluation-hardware-and-software/software/software-download.html?swpart=SFW0000780E
« Last Edit: July 25, 2023, 10:32:11 pm by DavidAlfa »
Hantek DSO2x1x            Drive        FAQ          DON'T BUY HANTEK! (Aka HALF-MADE)
Stm32 Soldering FW      Forum      Github      Donate
 
The following users thanked this post: tbw2

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3306
  • Country: gb
Edit:
The quote regarding UART packets - does that mean each byte I send needs an extra 3 bits adding?
I can’t just send the Sync byte, it needs the start, stop and parity bits adding? To make it 11bits?

The start, stop and parity bits are automatically added by the UART peripheral if you are using one (and configure it correctly).  If you are bit banging it then you'll need to do this manually.
 
The following users thanked this post: tbw2

Offline tbw2Topic starter

  • Contributor
  • Posts: 11
  • Country: gb
Success! Upon investigation of the outgoing data, it was found that the parity bit was not being added into the frame by the EUSART peripheral.

Turns out the PIC16F1615 does not support parity in the hardware, but I was able to modify the EUSART_Write function to include it, using the TX1STA register (TX9D bit).

Thank you all for your input.
 
The following users thanked this post: mikerj, DavidAlfa


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf