• AVR Freaks

Hot!PIC32MZW1 SPI1 No MOSI. Using SPI1 without ST26 driver

Author
Nibou11
Starting Member
  • Total Posts : 27
  • Reward points : 0
  • Joined: 2020/12/10 01:41:28
  • Location: 0
  • Status: offline
2021/02/26 08:05:04 (permalink)
0

PIC32MZW1 SPI1 No MOSI. Using SPI1 without ST26 driver

Hello,
 
I'm using PIC32MZW1 curiosity board + MPLAB Harmony V3. I've tested SPI2 works OK.
Now switching to SPI1 with the following config:
SCK1                        on RC6   -> 1MHz
SDO1(MOSI)             on RC8
SDI1(MISO)              on RC7
CS  (GPIO, out, high) on RA5
 
And
 
#define SPI1_CON_MSTEN                          (1 << _SPI1CON_MSTEN_POSITION)
#define SPI1_CON_CKP                              (0 << _SPI1CON_CKP_POSITION)
#define SPI1_CON_CKE                              (1 << _SPI1CON_CKE_POSITION)
#define SPI1_CON_MODE_32_MODE_16      (0 << _SPI1CON_MODE16_POSITION)
#define SPI1_CON_ENHBUF                        (1 << _SPI1CON_ENHBUF_POSITION)
#define SPI1_CON_MCLKSEL                      (0 << _SPI1CON_MCLKSEL_POSITION)
#define SPI1_CON_MSSEN                         (0 << _SPI1CON_MSSEN_POSITION)
#define SPI1_CON_SMP                             (0 << _SPI1CON_SMP_POSITION)
 
On logic analyzer, the clk and CS signals are OK, but no MOSI.
Why am I not seeing MOSI? Could you please help?
 
Is it even possible to use SPI1 without the ST26 driver?
Thank you
post edited by Nibou11 - 2021/03/02 06:24:24
#1

2 Replies Related Threads

    RISC
    Super Member
    • Total Posts : 6056
    • Reward points : 0
    • Status: offline
    Re: PIC3MZW1 SPI1 No MOSI 2021/02/26 08:09:54 (permalink)
    0
    Hi,
    Maybe these examples will help you : https://github.com/MicrochipTech/PIC32MZW1_Workshop
    Regards
     

    For support make sure to check first here : http://microchipdeveloper.com
    There are hundreds of PIC, AVR, SAM...which one do YOU use ?
    #2
    Nibou11
    Starting Member
    • Total Posts : 27
    • Reward points : 0
    • Joined: 2020/12/10 01:41:28
    • Location: 0
    • Status: offline
    Re: PIC3MZW1 SPI1 No MOSI 2021/03/01 02:48:05 (permalink)
    0
    Hi @RISC,
     
    I have tried the asynchronous and synchronous examples provided in csp_apps_pic32mz_w1. They both use SPI2.
    When I switch to SPI1 I do not see the MOSI signal (which worked on SPI2)!
    I'm using CE (RPA1) as per the image attached.
    Should I use this pin as CE in this component or am I doing it wrong?
    Thank you
     

    Attached Image(s)

    #3
    Jump to:
    © 2021 APG vNext Commercial Version 4.5