Hello everyone,
my current goal is to establish a connection via SPI to the LAN9252 chip (EVB-LAN9252-SPI) with the STM32H753ZI (Nucleo board).
“EVB-LAN9252-SPI”
This primarily involves reading simple registers such as “BYTE_TEST” or the “ID_Rev” (see data sheet below) and then implementing communication with a master via EtherCAT.
“LAN9252-Datasheet”
https://ww1.microchip.com/downloads/aemDocuments/documents/UNG/ProductDocuments/DataSheets/LAN9252-Data-Sheet-DS00001909.pdf#page=34&zoom=100,81,90
My configuration mainly consists of using the SPI3 in Full Duplex Master on the STM32 side and leaving everything else more or less on “standard” (see picture below).
My biggest concern and uncertainty lies in the “settings” on the ESC board (EVB-LAN9252-SPI). I followed the instructions and was able to set the ESC to the OP state via TwinCAT, but…
TwinCAT process:
- EtherCAT driver installed.
- A-XML: “Microchip EVB-LAN9252-HBI-SPI_MODE.xml” stored in the folder “TwinCAT\3.1\Config\Io\EtherCAT” → (error Vendor_ID ‘comparison 0xE00004D8==0x000004D8’) “TwinCAT device: without scan”
- B-XML: “OnlineDescriptionCache000004D8.xml” → (OP state successful) “TwinCAT device: with scan”
B-XML:
I then tried to address the above-mentioned registers, but unfortunately without success, i.e. I was unable to read either the “BYTE_TEST” or the “ID_REV”. After checking the SPI signals on the oscilloscope, there is no error regarding the SPI master. The CLK, CS and MOSI pins seem to perform everything correctly except for the MISO line, which does not return any values. Suspicion of the B-XML leads me to believe that this is not the correct .xml file for using SPI on the LAN9252.
“SOES- (Simple Open EtherCat Slave) Library”:
As far as I understand, the SOES-Lib is only functional with STM32 of the F-series, so I tried to map the same initialization sequence of SOES>ESC_Init() on the STM32H7 at least for the test I am performing, but without success.
I hope I was able to describe my problem and would be happy to receive advice. Please ask for more information if needed.
Best regards