• AVR Freaks

Hot!simulink SPI with SAMS70Q21B

Author
sassi14
New Member
  • Total Posts : 10
  • Reward points : 0
  • Joined: 2019/11/07 04:07:30
  • Location: 0
  • Status: offline
2019/11/12 07:18:13 (permalink)
0

simulink SPI with SAMS70Q21B

Hello,
 
I have configured my Matlab/Simulink to compile and generate code using the example SAME70Q21B_MCLV2_LongHurstMotor_WithEncoder.slx
 
But if I use the same analogy using SAMS70Q21B  to use SPI from the library I have an error as attached
====
Error evaluating 'Openfcn' callback of SPI driver clock (mask) 'SAMS70Q21B/BUS SPI: Callback is 'MCHP_BUS_SOI_callback(gcbh, open)
====
 
Can any one help please ?

Attached Image(s)

#1

4 Replies Related Threads

    Lubin
    Moderator
    • Total Posts : 397
    • Reward points : 5
    • Joined: 2007/03/31 07:38:15
    • Location: Bayonne, France
    • Status: offline
    Re: simulink SPI with SAMS70Q21B 2019/11/12 09:42:31 (permalink)
    0
    Hi Sassi,
     
    SPI Bus block is provided for dsPIC and PIC32 at this time.
    We do not support yet the SAM device family with SPI nor I2C. This might be done in the future depending on requests.
    May I ask what is your project about ?


    The workaround would be to implement SPI or I2C function through the C function call block.
     
    Lubin
    #2
    sassi14
    New Member
    • Total Posts : 10
    • Reward points : 0
    • Joined: 2019/11/07 04:07:30
    • Location: 0
    • Status: offline
    Re: simulink SPI with SAMS70Q21B 2019/11/12 09:52:12 (permalink)
    0
    Hi Lubin,
     
    I need to communicate with another IC using SPI, this IC is a sensor.
    Can you please give an example of this C function call back ?
     
    Zoheir
    #3
    Lubin
    Moderator
    • Total Posts : 397
    • Reward points : 5
    • Joined: 2007/03/31 07:38:15
    • Location: Bayonne, France
    • Status: offline
    Re: simulink SPI with SAMS70Q21B 2019/11/15 07:20:28 (permalink)
    0
    Hi Zoheir,
     
    One example showing the flexibility of that C functionc all block is provided with the blockset.
    Could you try to type picInfo at matlab prompt, then follow links to find one which will copy examples in your current folder for testing.
     
    Lubin
     
    #4
    sassi14
    New Member
    • Total Posts : 10
    • Reward points : 0
    • Joined: 2019/11/07 04:07:30
    • Location: 0
    • Status: offline
    Re: simulink SPI with SAMS70Q21B 2019/11/16 06:58:22 (permalink)
    0
    Hi Lubin,
     
    When you say "We do not support yet the SAM device family with SPI nor I2C. This might be done in the future depending on requests."
    The request shoould be done from who ? Microchip ? or customers ? should I wait ?
     
    Zoheir
    #5
    Jump to:
    © 2019 APG vNext Commercial Version 4.5