Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years ago.
Nucleo L476RG with MTi 1-s DK pinmap for SPi
Hello,
I am trying to connect Nucleo L476RG with MTi 1-s DK and using https://os.mbed.com/teams/Xsens/code/MTi-1_example/file/ff3afeaa31be/main.cpp/ as reference to start with. I was trying to achieve SPI communication as I think UART wouldn't be possible when Nucleo is connected to USB (might be wrong). Regardless, I changed the pinmap according to Arduino header image https://os.mbed.com/platforms/ST-Nucleo-L476RG/ and switched the PSEL switch to according position in order to get SPI, unfortunately I can't seem to make it work. I tried different baud rates in case that would be the problem, however it is the same result regardless: It fails to communicate with the MTi board. The pinmap I have so far is as follows:
- elif defined(TARGET_NUCLEO_L476RG)
- define PC_TX PA_2 OK
- define PC_RX PA_3 OK
- define MT_TX PB_9 OK
- define MT_RX PB_8 OK
- define MT_SDA PB_9 OK
- define MT_SCL PB_8 OK
- define MT_ADD0 PA_5 DIFF !!!
- define MT_ADD1 PA_6 DIFF !!!
- define MT_ADD2 PA_7 DIFF !!!
- define MT_MOSI PA_7 DIFF !!!
- define MT_MISO PA_6 DIFF !!!
- define MT_SCLK PA_5 DIFF !!!
- define MT_nCS PB_6 OK
- define MT_NRESET PA_10 OK
- define MT_DRDY PB_3 OK
I know that MT_TX and MT_RX lines are not changed correctly as I am not using UART it shouldn't be used. Does anyone know what could be the issue?
1 Answer
6 years ago.
Hi, Not sure I have an answer for your issue, but I don't see an issue with these configs. However, the MTi1-Example has printMessageData() that prints over PC_TX and PC_RX pins. Could you try resolving those pins correctly and retry?
Please share any more info that you may potentially be useful.
Thanks,
Naveen team mbed.
Hello, I did check the pins you mentioned and seem to be alright however the problem I think is that it doesn't seem to care whether the Xsens is connected to the Nucleo or not. The reasons I think like this is because the messages on the terminal do not make sense when only the Nucleo board is connected. On UART mode, the messages that are displayed are:
MTi-1 series embedded example firmware. Restoring communication with device...
The issue is the Xsens is not attached in this case so it should display a different message than this.
posted by 16 Nov 2018