• AVR Freaks

Hot!Pic32MM0256GPM064: Bug Report

Author
LaMain
New Member
  • Total Posts : 5
  • Reward points : 0
  • Joined: 2016/03/24 09:13:24
  • Location: 0
  • Status: offline
2020/09/23 08:22:12 (permalink)
0

Pic32MM0256GPM064: Bug Report

Hello
 
I've spotted a discordance between Documentation and Headers for the Pic32MM0256GPM064.
The Register IPC14 doesnt' match:
  Familt data sheets (pg. 67): U3RXIP, U2EIP, U2TXIP, U2RXIP
  p32mm0256gpm028.h says: U3TXIP, U3EIP
 
Which one is good ? I guess the header ?
 
 
post edited by LaMain - 2020/09/23 08:36:24
#1

7 Replies Related Threads

    MisterHemi
    Super Member
    • Total Posts : 302
    • Reward points : 0
    • Joined: 2017/11/02 12:24:21
    • Location: Commerce, CA USA
    • Status: online
    Re: Pic32MM0256GPM064: Bug Report 2020/09/23 08:52:19 (permalink)
    3 (1)
    The header would most likely be correct as it wouldn't function if you refer to the datasheet.
     
    If possible I would try testing it and see if you see the tx pin change states on an oscilloscope.
     

    My configuration:
    MacBook Pro (Retina, 15-inch, Mid 2015) with MacOS Mojave (10.14.6) and MPLAB X IDE v5.30
     
    Curiosity PIC32MZ EF 1 & 2, PIC24F Curiosity, XPRESS EVAL BOARD (PIC16F18855), SAMA5D3 Xplained and various custom boards.
    #2
    LaMain
    New Member
    • Total Posts : 5
    • Reward points : 0
    • Joined: 2016/03/24 09:13:24
    • Location: 0
    • Status: offline
    Re: Pic32MM0256GPM064: Bug Report 2020/09/24 08:38:36 (permalink)
    0
    Mmmhh ... but the register is all about interrupts priority, not any pin states.
    Did i misunderstand your point ?
     
    #3
    MisterHemi
    Super Member
    • Total Posts : 302
    • Reward points : 0
    • Joined: 2017/11/02 12:24:21
    • Location: Commerce, CA USA
    • Status: online
    Re: Pic32MM0256GPM064: Bug Report 2020/09/24 09:16:41 (permalink)
    0
    There are a few registers. The registers should contain the bits for enabling/disabling the UART, interrupt enable, and the interrupt priority and sub priority, the number of data bits (e.g.- 5,6,7 or 8), stop bits, and parity.
     
     

    My configuration:
    MacBook Pro (Retina, 15-inch, Mid 2015) with MacOS Mojave (10.14.6) and MPLAB X IDE v5.30
     
    Curiosity PIC32MZ EF 1 & 2, PIC24F Curiosity, XPRESS EVAL BOARD (PIC16F18855), SAMA5D3 Xplained and various custom boards.
    #4
    MisterHemi
    Super Member
    • Total Posts : 302
    • Reward points : 0
    • Joined: 2017/11/02 12:24:21
    • Location: Commerce, CA USA
    • Status: online
    Re: Pic32MM0256GPM064: Bug Report 2020/09/24 09:18:18 (permalink)
    0
    Ok... I re-read your first post, i'll try to clarify...
     
    The registers in the header file should be correct and you would need to set the priority (0 to 7) and sub priority using those registers.
     

    My configuration:
    MacBook Pro (Retina, 15-inch, Mid 2015) with MacOS Mojave (10.14.6) and MPLAB X IDE v5.30
     
    Curiosity PIC32MZ EF 1 & 2, PIC24F Curiosity, XPRESS EVAL BOARD (PIC16F18855), SAMA5D3 Xplained and various custom boards.
    #5
    Mysil
    Super Member
    • Total Posts : 3796
    • Reward points : 0
    • Joined: 2012/07/01 04:19:50
    • Location: Norway
    • Status: offline
    Re: Pic32MM0256GPM064: Bug Report 2020/09/24 15:12:44 (permalink)
    5 (1)
    Hi,
    Usually, if a mistake in register documentation is noticed,
    the Device header file is corrected in the next compiler release,
    whereas Datasheet isn't released quite as frequently.
    So when discussing this, it may be important to notice which version of the Datasheet document,
    and what revision of compiler distribution is referenced.
    I am just now looking at Datasheet DS60001387C-page 69
     
    It seem to me that in PIC32 devices, sequence of fields in Interrupt Priority registers, Interrupt Flag registers,
    and Interrupt Enable registers, follow the same sequence, which is the sequence of Interrupt Vector numbering.
    You may crossreference with Interrupt table in datasheet chapter 7:  TABLE 7-2 INTERRUPTS
     
    U3RXIP<2:0> U3RXIS<1:0> U2EIP<2:0> U2EIS<1:0> — U2TXIP<2:0> U2TXIS<1:0> — U2RXIP<2:0> U2RXIS<1:0>
    It seem to me, that   U3EIP,  U3TXIP  belong in IPC15 register, not IPC14
     
    Since PIC is a little-endian computer, increasing bit numbers are shown from right toward left within each register.
     
    p32mm0256gpm028.h  isn't device header file for PIC32MM256GPM064 device
    There should be separate
    p32mm0256gpm064.h  for PIC32MM256GPM064 device,
    even if they share the same datasheet.
     
    In xc32/v2.30/ /p32mm0256gpm028.h    i find this:
    typedef struct {
      uint32_t U2RXIS:2;
      uint32_t U2RXIP:3;
      uint32_t :3;
      uint32_t U2TXIS:2;
      uint32_t U2TXIP:3;
      uint32_t :3;
      uint32_t U2EIS:2;
      uint32_t U2EIP:3;
      uint32_t :3;
      uint32_t U3RXIS:2;
      uint32_t U3RXIP:3;
    } __IPC14bits_t;
       ...
    typedef struct {
      uint32_t U3TXIS:2;
      uint32_t U3TXIP:3;
      uint32_t :3;
      uint32_t U3EIS:2;
      uint32_t U3EIP:3;
    } __IPC15bits_t;

    I cannot detect any mistake here.
     
        Mysil
     
     
    post edited by Mysil - 2020/09/24 15:28:39
    #6
    LaMain
    New Member
    • Total Posts : 5
    • Reward points : 0
    • Joined: 2016/03/24 09:13:24
    • Location: 0
    • Status: offline
    Re: Pic32MM0256GPM064: Bug Report 2020/09/25 08:26:39 (permalink)
    0
    @MisterHemi : the mismatch is on the content of IPC14, which is all about interrupts priority. Why are you talking about UART configuration registers ?
     
    You're right i should have post my versions:
     - the pic i used is a 'p32mm0256gpm028',  so it's header is 'p32mm0256gpm028.h' obviously
     - the datasheet is 'DS60001387D' which cover my '-gpm028' (Table 1)
     
    And, while rechecking my statements, it seems i messed up. Still, i was real sure at the time i posted.
    So, sorry for the inconveniency.
    And thanks for your responses.
     
    #7
    MisterHemi
    Super Member
    • Total Posts : 302
    • Reward points : 0
    • Joined: 2017/11/02 12:24:21
    • Location: Commerce, CA USA
    • Status: online
    Re: Pic32MM0256GPM064: Bug Report 2020/09/25 10:33:12 (permalink)
    0
    LaMain
    @MisterHemi : the mismatch is on the content of IPC14, which is all about interrupts priority. Why are you talking about UART configuration registers ?
     



     
    I misunderstood... tired this week... I was thinking you were having issues with the UART.

    My configuration:
    MacBook Pro (Retina, 15-inch, Mid 2015) with MacOS Mojave (10.14.6) and MPLAB X IDE v5.30
     
    Curiosity PIC32MZ EF 1 & 2, PIC24F Curiosity, XPRESS EVAL BOARD (PIC16F18855), SAMA5D3 Xplained and various custom boards.
    #8
    Jump to:
    © 2020 APG vNext Commercial Version 4.5