5 years, 5 months 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:

  1. elif defined(TARGET_NUCLEO_L476RG)
  1. define PC_TX PA_2 OK
  2. define PC_RX PA_3 OK
  3. define MT_TX PB_9 OK
  4. define MT_RX PB_8 OK
  5. define MT_SDA PB_9 OK
  6. define MT_SCL PB_8 OK
  7. define MT_ADD0 PA_5 DIFF !!!
  8. define MT_ADD1 PA_6 DIFF !!!
  9. define MT_ADD2 PA_7 DIFF !!!
  10. define MT_MOSI PA_7 DIFF !!!
  11. define MT_MISO PA_6 DIFF !!!
  12. define MT_SCLK PA_5 DIFF !!!
  13. define MT_nCS PB_6 OK
  14. define MT_NRESET PA_10 OK
  15. 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

5 years, 5 months 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 Edvardas Vysniauskas 16 Nov 2018