You are reading a single comment by @GeekBot and its replies. Click here to read the full conversation.
  • Hello,

    I try to connect a radio module using an SPI link (on SPI3, Espruino Pico, Firmware V1.90)
    Here is my code :

    SPI3.setup({sck:B3, miso:B4, mosi:B5, baud:10000, mode:0, order:'msb'});
    var registreW = {data : 0x81, count : 1};
    var modeASK = {data : 0x23, count : 1};
    var returnedData;
    returnedData = SPI3.send(registreW,A7);
    console.log(returnedData[0]);
    returnedData = SPI3.send(modeASK,A7);
    console.log(returnedData[0]);
    

    NSS Pin is A7.
    Since this code doesn't work (communication doesn't work), I had a look at signals with the logic state analyzer.
    I attach a screen capture. In fact, NSS PIN is set high too early, when the last byte is not totally sent. I looked at the code line 212, the PIN change seems to be executed without knowledge of end of transmission, but I can be wrong !!
    Help will be greatly appreciated.
    Best regards
    GeekBot


    1 Attachment

    • SPI-NSS-pb.PNG
About

Avatar for GeekBot @GeekBot started