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: 00000001 R1: 2004e840" those seems to be inverted (00000001 seems to
be a "bus" and "2004e840" seems to be a "spi" pointer). The assembly code
will show light on the dump that you provided. As an alternative you can
provide the defconfig that you use if you are not using a custom board.

Best regards,
Petro


нд, 6 бер. 2022 р. о 10:54 Roberto Bucher <roberto.buc...@supsi.ch> пише:

> 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: 00000001 R1: 2004e840 R2: 40004800  R3: 20010684
> arm_registerdump: R4: 2004e7a0 R5: 00000002 R6: 2004f370  FP: 20010670
> arm_registerdump: R8: 00000000 SB: 00000000 SL: 00000000 R11: 00000000
> arm_registerdump: IP: 00000003 SP: 2004f370 LR: 08005fad  PC: 0800648e
> arm_registerdump: xPSR: 61000000 PRIMASK: 00000000 CONTROL: 00000004
> arm_registerdump: EXC_RETURN: ffffffe9
> arm_dump_stack: User Stack:
>
> On the line 358 of spi_driver.c there is this assertion:
>
>   /* Sanity check */
>
>   DEBUGASSERT(spi != NULL && (unsigned)bus < 1000);
>
> Any Idea?
>
> Best regards
>
> Roberto
>
>
>
>

Reply via email to