BPI-M2 Zero SPI CPOL problem

Hello everyone!

I’m working on an embedded bio-potential data logger system based on the ADS1294. This project started with a simple MCU, but the database, web server, filtering, etc. requirements made me choose the BPI. I’ve built the OS from scratch (Linux 5.7.4). The ADS1294 communicates through SPI mode1 protocol. When I set the spidev0.0 to mode1 and start the data transfer, only junk came back, so I took out the logic analyzer and here is the interesting part.

If I set mode1 the clk line has an initial anomaly (mode1.jpg) which may confuse the ADS1294. At least the logic analyzer software was confused. If I set mode3 everything works as expected (mode3.jpg). Just for my sanity’s sake I’ve took out an Arduino nano, and started an SPI communication in mode1 (mode1_arduino.jpg). The waveform behaved as expected, and I could communicate with the ADS1294.

I have a feeling that some register is messed up, because this is my first time working with SPI in embedded OS, but I can’t figure out how to get rid of the problem.

Any help would be appreciated.

Áron.

Looks like no one encountered this problem. Not with BPI, not with SPIDEV. If that is the case I must look for an alternative chip/board, because I can’t figure it out.

Hey guys. Difficult article for me, but not for our team of professionals. If you need an essay on any difficult and not very topic, be sure to contact us. We will help you. Affordable, high quality and fast. Here is the link.