SPI crash on the Arduino Nicla Vision

Hi everyone,
I am trying to connect an MCP2515 module to the arduino Nicla Vision. The SPI is wired with CS = GPIO2 (PA10). I tested only with that module connected.
I use the pyb library I would like to use only the command

SPI(4, SPI.MASTER)

But I have to use a prescaler to avoid crashing the card.

This is a very simplified extract of the code but it still crash :

from pyb import Pin, SPI

_DEBUG = True
def print_debug(message):
    if _DEBUG : print(message)

class CAN:
    def __init__(self) -> None:
        self._SPICS = Pin('PA10', Pin.OUT)
        self._SPI = SPI(4, SPI.MASTER)#, polarity=0, phase=0)#, prescaler = 10, , , firstbit = SPI.MSB) #baudrate = 1000000,
        print_debug("End SPI build")

        if self.reset() != ERROR_OK: print("Can not reset for MCP2515")
        print_debug("End Initialisation")

    def SPI_start(self) -> None:
        self._SPICS.low()

    def SPI_end(self) -> None:
        self._SPICS.high()

    def reset(self) -> int:
        self.SPI_start()
        value=0xC0
        #value=value.to_bytes(1, sys.byteorder)
        self._SPI.send(value)
        self.SPI_end()
        print_debug("Reset OK")
        return 0

can = CAN()

Moreover, it seems that it crash so rapidly that the IDE can’t receive Serials because I can’t print anything. (it work with the “prescaler version”).
Then the IDE popup a message “busy… try later” ???

Does anyone have an idea for my problem ?
Thank you very much for helping me.

Well, it seems that it’s the SPI_send(value) that crash the board. I really don’t know why. Everything is fine until this line. I even test it with only the nicla vision board (everything else disconnected) : same issue.

Can you create a bug ticket on github?

Might have something to do with non/DMA path. Please report it github, include a script to reproduce it and will look into it.

Hi thank you for your answers.

Honestly, I’m not familiar with github’s tickets. I even don’t know in which depository post it.
But I can submit this script for testing

from pyb import Pin, SPI

spi = SPI(4, SPI.MASTER)
cs = Pin("PA10", Pin.OUT, value=1)

def spi_send(c):
    cs.value(0)
    spi.send(c)
    cs.value(1)

print("Before send")
spi_send(0x00)
print("After send")

However, it seems that the new development release fixed the problem.

The script run smoothly, but by habit I don’t rely on development release because of instabilities. But it seems that I have no other choice.