MQX USB problem when writing to SPI registers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MQX USB problem when writing to SPI registers

Jump to solution
690 Views
terencet
Contributor III

Hi all

I'm using the TWR-K60F120M board with uVision 5 and MQX 4.0.1

I'm trying to send some data over USB that I get from another board I'm talking to via SPI.

Both bits work individually but I've found that whenever I'm writing directly to the registers USB wont work.

I had the same problem when using the LEDS on the board so I just switched to using the MQX GPIO functions.

I have tried MQXs SPI driver and that doesn't seem to work properly as I mentioned in here MQX 4 SPI Problem TWR-K60F120M

So I'm wondering why can't I use the USB driver and write directly to the registers? Is there any way to do this?

0 Kudos
1 Solution
526 Views
terencet
Contributor III

Ok cleared the last piece up it was all to do with the GPIOs I was using. I was using SPI to communicate with a specific chip that I needed to use some GPIOs with to set the mode and such. Turns out that these are being used by the USB on the TWR-SER2 as well.

So it was the PORTA 10, 11, 28, 19 and PORTB 8, 9 that were causing the problems looks like I'll have to use some other ones but at least I know what it was now.

View solution in original post

0 Kudos
3 Replies
527 Views
terencet
Contributor III

Ok cleared the last piece up it was all to do with the GPIOs I was using. I was using SPI to communicate with a specific chip that I needed to use some GPIOs with to set the mode and such. Turns out that these are being used by the USB on the TWR-SER2 as well.

So it was the PORTA 10, 11, 28, 19 and PORTB 8, 9 that were causing the problems looks like I'll have to use some other ones but at least I know what it was now.

0 Kudos
526 Views
terencet
Contributor III

So it looks like the LEDs are using the same port as the ULPI interface (A 10,11,28,19) which would explain why I am having problems there.

It also says in the TWR-SER2 User manual that SPI0 is being used which is the same SPI device that I am trying to use.

Does any one know what it is used by? it doesn't seem to connect to anything on the schematic diagram and doesn't mark anything else in the user guide apart from a mark in the used column.

0 Kudos
526 Views
terencet
Contributor III

Hmm apparently it doesn't work when I'm writing to the LEDs using the GPIO functions as well. Not to sure why it doesn't like playing nice must be some thing odd I'm doing.

0 Kudos