Can somebody provide a working Vybrid DSPI sample code for any SPI chip under Timesys Linux ?

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

Can somebody provide a working Vybrid DSPI sample code for any SPI chip under Timesys Linux ?

Jump to solution
2,131 Views
dragan
Contributor III

Respected Colleagues and Bruno Castelucci

 

I have made modifications for Phytec Vybrid Cosmic+ Board to the board-pcl052.c file in the way that Bruno Castelucci did in the board-pcm052.c file (Discussion SPI Driver on Linux Side).

 

Test from the shell like Bruno's with modeprobe spi_mvf_dspi returned:

 

# modprobe spi_mvf_dspi

DSPI: Coldfire master initialized

#

 

Does it mean that DSPI is correctly initialized? How can I trace it further? I see that Bruno got bunch of lines as a trace report.

 

So, can somebody attach a working example code for any SPI chip (EEPROM, FLASH, RTC, etc.) for Vybrid VF61 under Timesys Linux to make test on some real hardware chip.

 

This will help a lot for further development.

 

File with DSPI modifications for Phytec Cosmic+ Board is attached.

 

Thanks in advance.

 

With best regards,

Dragan Kujovic

Original Attachment has been moved to: board-pcl052.c.txt.zip

Labels (3)
0 Kudos
Reply
1 Solution
1,309 Views
dragan
Contributor III

Respected timesyssupport,

thanks for your suggestions regarding DSPI.

I have made a DSPI example code for the Phytec Vybrid Cosmic+ board under Timesys Linux.

DSPI under Timesys Linux now works like a charm (tested on the real hardware SPI chips). Sample code has all SPI basic settings (SPI Mode, SPI Speed, SPI number of bits per word and LSB/MSB option).

Sample code and configuration files are attached.

With best regards,

Dragan Kujovic

View solution in original post

4 Replies
1,309 Views
timesyssupport
Senior Contributor II

Hello Dragan,

After you load the spi_mvf_dspi module, you should also probe the spidev module. After doing so, you should see /dev/spidevX.Y entries for each spi interface enabled in your Linux board configuration file. For relevant spidev documentation and test source, please see the Documentation/spi/spidev file in your kernel sources:

https://www.kernel.org/doc/Documentation/spi/spidev

Thanks,

Timesys Support

1,310 Views
dragan
Contributor III

Respected timesyssupport,

thanks for your suggestions regarding DSPI.

I have made a DSPI example code for the Phytec Vybrid Cosmic+ board under Timesys Linux.

DSPI under Timesys Linux now works like a charm (tested on the real hardware SPI chips). Sample code has all SPI basic settings (SPI Mode, SPI Speed, SPI number of bits per word and LSB/MSB option).

Sample code and configuration files are attached.

With best regards,

Dragan Kujovic

1,309 Views
bfac
NXP Employee
NXP Employee

Hello Dragan,

I believe timesyssupport can help in this case.

karinavalencia

0 Kudos
Reply
1,309 Views
karina_valencia
NXP Apps Support
NXP Apps Support

timesyssupport can you help to review this case?

0 Kudos
Reply