Hello Everyone
I am configing my SJA1105QEL via a SPI interface, I'v got the static config stream via tools like figure shows, but I cannot get the "CONFIGS" flag set at address 0x0001:bit 31 after writing the stream into the core. Are there any point I'v missed? Help please.
Thanks. #SJA1105
Solved! Go to Solution.
Hi @BravoEven
you need to send control word first before the stream. Did you send it? It's also mentioned in the user manual:
There's a sample code for this board:
Link to the code is:
https://www.nxp.com/webapp/Download?colCode=SJA1105SMBEVM-SDK-FIRMWARE&appType=license
And here you can find a function which prepares data to be sent via SPI. As you can see, it creates control word at the beginning and then it appends the byte stream:
The function can be found in enet_app.c file.
I guess that this could be the source of problem.
Regards,
Lukas
By the way ,I just write the stream into the SPI interface one by one(for example: first word is the Device ID) and haven't cared about the structure of write fram shown in chapter3 of UM11040
Hi @BravoEven
you need to send control word first before the stream. Did you send it? It's also mentioned in the user manual:
There's a sample code for this board:
Link to the code is:
https://www.nxp.com/webapp/Download?colCode=SJA1105SMBEVM-SDK-FIRMWARE&appType=license
And here you can find a function which prepares data to be sent via SPI. As you can see, it creates control word at the beginning and then it appends the byte stream:
The function can be found in enet_app.c file.
I guess that this could be the source of problem.
Regards,
Lukas
Dear Lukaszadrapa:
Your advice is very helpful! Thank you very much for the demo code!
Have a good day!