CS not working with C on SPI interface with wiringPi library - Raspberry Pi Forums


i'm developing qt on linux , remote deploy/debugging raspberry pi. seems work fine, code deploys, runs, it's thing expected, single stepping works etc...

i'm using wiringpi library gpio , spi port. i'm selecting use ce0, channel 0 etc... can see chip select no toggling. hooked gpio cs , did manually set in code. works. data etc..

there problem or error right except toggle cs correctly?

code: select all

//fails, scope shows no activity on cs0, other lines seem fine. filespi=wiringpispisetup (0, 1e6);  //channel 0, 1mhz clock wiringpispidatarw(filespi,spibuffer,2);  //transfer 2 bytes spibuffer  //works when use gpio rather normal cs pinmode (3, output) ; digitalwrite (3, 1); filespi=wiringpispisetup (0, 1e6);  //channel 0, 1mhz clock wiringpispidatarw(filespi,spibuffer,2);  //transfer 2 bytes spibuffer digitalwrite (3, 0); 
ideas?

fixed.. works.. swear not working before, does.. please disregard cry help.


raspberrypi



Comments

Popular posts from this blog

Convierte tu Raspberry en un NAS. Firmware fvdw-sl 15.3 - Raspberry Pi Forums

How to format a Get Request

avrdude: verification error, first mismatch at byte 0x0000 0x0c != 0x62