Serial RX DMA polling

2022-03-06 Thread Michal Lenc
Hi all, serial drivers use periodic polling for DMA receive callback to ensure the reception of bytes that were not taken by DMA interrupt. There are functions like stm32_serial_dma_poll(void) that should be periodically called from a timer for this purpose. However I haven´t been able to find a

Re: SPI problem

2022-03-06 Thread Roberto Bucher
Thanks Petro I've modified the nucleo-144/src/stm32_spi.c file by simply adding: struct spi_dev_s *g_spiX; and by adding spi_register(g_spiX, X); in the where X is the spi device number (in my example spi2) in the shell the /dev/spi2 is available. Best regards Roberto On 3/6/22 12:49, Pe

Re: SPI problem

2022-03-06 Thread Tim Hardisty
>From my own struggles to get a board (custom board as it happens, but like >others that were there) I found: Board support was often incomplete. Look at other boards to see where and how SPI is initialised and registered. You may find something basic is missing. Stack size. Random errors occu

Re: SPI problem

2022-03-06 Thread Petro Karashchenko
Hello Roberto, I'm asking this because I examined nucleo-144 board source code and currently I do not see a "spi_register" call in board init files. So I assume that you have some modified code and it is very hard to make any conclusions while not seeing the code. Best regards, Petro нд, 6 бер.

Re: SPI problem

2022-03-06 Thread Petro Karashchenko
Hello Roberto, It would be good if you can dump assembly that is generated. What I see is that "int spi_register(FAR struct spi_dev_s *spi, int bus)", so I'm assuming that R0 should be "spi" and R1 should be "bus", but in your dump "R0: 0001 R1: 2004e840" those seems to be inverted (0001 s

SPI problem

2022-03-06 Thread Roberto Bucher
When I enable some dubug configs I get the following error by enter in the serial shell: sert: Assertion failed at file:spi/spi_driver.c line: 358 arm_registerdump: R0: 0001 R1: 2004e840 R2: 40004800  R3: 20010684 arm_registerdump: R4: 2004e7a0 R5: 0002 R6: 2004f370  FP: 20010670 arm_r

Re: SPI Example

2022-03-06 Thread Roberto Bucher
I followed a bit the problem with the SPI bus and I reached to find where I have the first problem: 1) In the shell: spi bus gives me that the BUS 2 is available 2) I launch "spi -b2 -x4 aabbccdd" and I pass through the following files:     apps/system/spi/spi_exch.c -> apps/system/spi/spi_devif