Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SPI issue on BananaPi M2 (sun6i)

Featured Replies

Hello, guys,

has anyone ever faced issues with SPI controller on BananaPi M2 ?

I am having a  weird issue which is confirmed by at least 2 peripherals: Waveshare 3.5 LCD and NRF24 wireless chip.

The data incoming from MISO is always shifted by 1 bit to the left. , i.e. reading STATUS register of NRF24 gives 0x1C instead of expected value 0xE. The same story with other registers.  Saleae logic analyzer is always showing correct pictures !!! See attached image as an example of reading STATUS register from NRF24: master is sending 0x07 and receiving 0x0E (14).

I have tweaked byte rate and other parameters - no result. I have finally tried to connect using the bitbang SPI gpio driver and it worked as expected.

Does this mean the A31s SPI is broken? It is hard to believe in that... Or it is still a kernel (sun6i SPI driver or whatever) issue ? I am using Kernel 4.13 and 4.14.

Thanks.

 

 

Screenshot from 2017-11-16 17-51-53.png

I have a similar problem, the screen is tearing and I get SPI 110 errors filling up the dmesg log. Somebody mentioned the maximum transfer size should be the FIFO size (or FIFO size - 1) rather than the maximum transfer size (or maximum transfer size - 1).  I tried all that and it did not seem to help. If I change the txbuflen to something smaller (like 16384 instead of 65536 or 32768), the tearings seem to happen less often. This happens to both SPIs, I have attached an image showing the tearings - note the extra rectangles (above the login box) on both screens.

 

 

_4210622.JPG

  • Author

Yes, you were 100% right.

I was able to overcome the issue  by rewriting the driver a little bit so that the maximum transfer length is always the FIFO size.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.