Search found 4 matches

by misterbo
Tue Mar 30, 2021 4:55 pm
Forum: Projects
Topic: Reading SPI accelerometers
Replies: 10
Views: 7014

Re: Reading SPI accelerometers

Ok, before entering the world of bit banding I tried keeping the cs line low without modifying it in writebyte and readbyte functions (even if the numbers I'm getting do not have any meaning, just to see what kind of improvement I could get with bit banding), and I'm getting an output data rate of 1...
by misterbo
Tue Mar 30, 2021 4:08 pm
Forum: Projects
Topic: Reading SPI accelerometers
Replies: 10
Views: 7014

Re: Reading SPI accelerometers

Thanks for your answer! I'm trying to use digitalWriteFast but I'm getting an "invalid conversion from 'uint8_t' {aka 'unsigned char'} to 'PinName' [-fpermissive]" error... And I can't use dma since I need reliable results (I need to do some FRF computation on those signals). However I'm u...
by misterbo
Tue Mar 30, 2021 3:11 pm
Forum: Projects
Topic: Reading SPI accelerometers
Replies: 10
Views: 7014

Re: Reading SPI accelerometers

Thanks! I eliminated the lines for beginTransaction and endTransaction, and I'm getting slightly better results (12.5kHz) but I didn't get your first point; are you suggesting to use something like dest=SPI.transfer(zeros, count) instead of for (uint8_t ii = 0; ii < count; ii++) { dest[ii] = SPI.tra...
by misterbo
Tue Mar 30, 2021 2:16 pm
Forum: Projects
Topic: Reading SPI accelerometers
Replies: 10
Views: 7014

Reading SPI accelerometers

Hi everyone, I have a Nucleo L476RG board and I'd like to read the outputs from two IIS3DWB accelerometers and send them to a serial communication at 22kHz frequency. At the moment I'm trying with just a single accelerometer but I'm getting only about 10k values per second, how can I improve the spe...

Go to advanced search