• AVR Freaks

Helpful ReplyHot!FYI: Acquiring PIC32MZ Revision B2 Silicon

Author
MisterHemi
Super Member
  • Total Posts : 276
  • Reward points : 0
  • Joined: 2017/11/02 12:24:21
  • Location: Commerce, CA USA
  • Status: offline
2020/07/11 07:14:56 (permalink)
4.2 (5)

FYI: Acquiring PIC32MZ Revision B2 Silicon

Hello,
 
If you're wondering how to get the B2 revision in small quantities, you can place an order on the Microchipdirect website.
 
You must get the order number and email it to customer service. I suggest doing this on a week day and not on a Friday as they may not see the email in time (it happened to me).
 
They had to get the package back from FedEx but they did send a package with the correct silicon revision.
 
I really needed the B2 version as i'm using multiple I2C ports. The I2C works well but if you were using older code to compensate for the flaws in the previous revisions you may need to make some changes to make it work correctly.
 
Kind of like having to undo the bug fixes because they're not needed.
 
I have some displays connected to I2C-1, about 13 small devices connected to I2C-2 and later an I2C memory device, etc on I2C-3. So far everything connected is working great.
 
The only thing that i'm having a problem with is the USB acting strangely (intermittently enumerating), maybe a software issue or maybe my laptop.

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.
#1
DominusT
Super Member
  • Total Posts : 1424
  • Reward points : 0
  • Joined: 2005/07/22 08:31:18
  • Status: offline
Re: FYI: Acquiring PIC32MZ Revision B2 Silicon 2020/07/11 15:59:57 (permalink)
0
MisterHemi
 
The only thing that i'm having a problem with is the USB acting strangely (intermittently enumerating), maybe a software issue or maybe my laptop.




Hi. 

A question. Are you using the USB interrupt and DMA module in some way?
#2
MisterHemi
Super Member
  • Total Posts : 276
  • Reward points : 0
  • Joined: 2017/11/02 12:24:21
  • Location: Commerce, CA USA
  • Status: offline
Re: FYI: Acquiring PIC32MZ Revision B2 Silicon 2020/07/11 16:24:05 (permalink)
4 (1)
DominusT
MisterHemi
 
The only thing that i'm having a problem with is the USB acting strangely (intermittently enumerating), maybe a software issue or maybe my laptop.




Hi. 

A question. Are you using the USB interrupt and DMA module in some way?




Yes I use USB interrupts and I have been trying to get USB DMA working too.
 
I contacted Microchip regarding the USB DMA issues and they sent me some code from Harmony which i'm dissecting because i'm not using Harmony for USB.
 
To describe the problem: USB intermittently enumerates. A few times after disconnecting the PicKit4 from the USB hub my board (custom board) enumerated. I'm not sure exactly why.
 
It's happened when i've had my board connected directly or through a hub, while the PicKit4 is connected to the hub.

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.
#3
DominusT
Super Member
  • Total Posts : 1424
  • Reward points : 0
  • Joined: 2005/07/22 08:31:18
  • Status: offline
Re: FYI: Acquiring PIC32MZ Revision B2 Silicon 2020/07/11 16:50:05 (permalink)
0
MisterHemi
DominusT
MisterHemi
 
The only thing that i'm having a problem with is the USB acting strangely (intermittently enumerating), maybe a software issue or maybe my laptop.




Hi. 

A question. Are you using the USB interrupt and DMA module in some way?




Yes I use USB interrupts and I have been trying to get USB DMA working too.
 
I contacted Microchip regarding the USB DMA issues and they sent me some code from Harmony which i'm dissecting because i'm not using Harmony for USB.
 
To describe the problem: USB intermittently enumerates. A few times after disconnecting the PicKit4 from the USB hub my board (custom board) enumerated. I'm not sure exactly why.
 
It's happened when i've had my board connected directly or through a hub, while the PicKit4 is connected to the hub.




 
I had a problem with the USB module running interrupt and the DMA being used as a CRC generator:

https://www.microchip.com/forums/m1120595.aspx#1122012


I asked for help from technical support and they also managed to reproduce the error and they determined that there was a problem using the USB interrupt and DMA interrupt.

The solution was to use USB with polled mode.


They couldn't determine if it was a silicon bug or a bug at Harmony and they were supposed to be sending my case to someone much more specialized but there were no other answers.


For me that solution was enough.


Maybe using polled mode will solve the problem.



#4
MisterHemi
Super Member
  • Total Posts : 276
  • Reward points : 0
  • Joined: 2017/11/02 12:24:21
  • Location: Commerce, CA USA
  • Status: offline
Re: FYI: Acquiring PIC32MZ Revision B2 Silicon 2020/07/11 17:00:30 (permalink)
0
DominusT
MisterHemi
DominusT
MisterHemi
 
The only thing that i'm having a problem with is the USB acting strangely (intermittently enumerating), maybe a software issue or maybe my laptop.




Hi. 

A question. Are you using the USB interrupt and DMA module in some way?




Yes I use USB interrupts and I have been trying to get USB DMA working too.
 
I contacted Microchip regarding the USB DMA issues and they sent me some code from Harmony which i'm dissecting because i'm not using Harmony for USB.
 
To describe the problem: USB intermittently enumerates. A few times after disconnecting the PicKit4 from the USB hub my board (custom board) enumerated. I'm not sure exactly why.
 
It's happened when i've had my board connected directly or through a hub, while the PicKit4 is connected to the hub.




 
I had a problem with the USB module running interrupt and the DMA being used as a CRC generator:

https://www.microchip.com/forums/m1120595.aspx#1122012


I asked for help from technical support and they also managed to reproduce the error and they determined that there was a problem using the USB interrupt and DMA interrupt.

The solution was to use USB with polled mode.


They couldn't determine if it was a silicon bug or a bug at Harmony and they were supposed to be sending my case to someone much more specialized but there were no other answers.


For me that solution was enough.


Maybe using polled mode will solve the problem.







 
Interesting..... I had some suspicions about a possible silicon bug.
 
I don't use Harmony and may be having the same problem possibly. I'll have to investigate that.
 
Thanks for the information!
 
 
Also... I just remembered something..... here's what's unusual:
 
My code works fine on the Curiosity PIC32MZEF board 1.0 (A1 silicon) and board 2.0 (B2 silicon)
 
On my own board is where it's having problems. My USB circuit is the same as Microchip has on the 2.0 board.
 
The differences are that i'm using a PIC32MZ2048EFH144-I/PL (B2 silicon)  - the larger package versus the smaller one on the 2.0 board.

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
MisterHemi
Super Member
  • Total Posts : 276
  • Reward points : 0
  • Joined: 2017/11/02 12:24:21
  • Location: Commerce, CA USA
  • Status: offline
Re: FYI: Acquiring PIC32MZ Revision B2 Silicon 2020/07/15 10:34:58 (permalink) ☄ Helpfulby EngSam 2020/07/27 04:08:46
4 (1)
DominusT
MisterHemi
DominusT
MisterHemi
 
The only thing that i'm having a problem with is the USB acting strangely (intermittently enumerating), maybe a software issue or maybe my laptop.




Hi. 

A question. Are you using the USB interrupt and DMA module in some way?




Yes I use USB interrupts and I have been trying to get USB DMA working too.
 
I contacted Microchip regarding the USB DMA issues and they sent me some code from Harmony which i'm dissecting because i'm not using Harmony for USB.
 
To describe the problem: USB intermittently enumerates. A few times after disconnecting the PicKit4 from the USB hub my board (custom board) enumerated. I'm not sure exactly why.
 
It's happened when i've had my board connected directly or through a hub, while the PicKit4 is connected to the hub.




 
I had a problem with the USB module running interrupt and the DMA being used as a CRC generator:

https://www.microchip.com/forums/m1120595.aspx#1122012


I asked for help from technical support and they also managed to reproduce the error and they determined that there was a problem using the USB interrupt and DMA interrupt.

The solution was to use USB with polled mode.


They couldn't determine if it was a silicon bug or a bug at Harmony and they were supposed to be sending my case to someone much more specialized but there were no other answers.


For me that solution was enough.


Maybe using polled mode will solve the problem.







I managed to solve the intermittent enumeration problem and I was going to add it to my post "How To: PIC32MZ USB without Harmony" but the forum is giving me problems even when trying to use the work arounds....
 
I'll add it later but for reference, in case anyone else comes across this problem, here is the update:
 

UPDATE - 15 July 2020:
I recently acquired some PIC32MZ Revision B2 silicon. Initially the USB interrupt was working intermittently but rarely.
I was able to resolve the problem after adding some code at the end of the initialization function, just before enabling the interrupts. Here is the additional code:


// VBUSMONEN: VBUS Monitoring for OTG Enable bit
// 1 = Enable monitoring for VBUS in VBUS Valid range (between 4.4V and 4.75V)
// 0 = Disable monitoring for VBUS in VBUS Valid range
USBCRCONbits.VBUSMONEN = 1;
// USBIDOVEN: USB ID Override Enable bit
// 1 = Enable use of USBIDVAL bit
// 0 = Disable use of USBIDVAL and instead use the PHY value
USBCRCONbits.USBIDOVEN = 1;
// USBIDVAL: USB ID Value bit
// 1 = ID override value is 1 (Device)
// 0 = ID override value is 0 (Host)
USBCRCONbits.USBIDVAL = 1;



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.
#6
MisterHemi
Super Member
  • Total Posts : 276
  • Reward points : 0
  • Joined: 2017/11/02 12:24:21
  • Location: Commerce, CA USA
  • Status: offline
Re: FYI: Acquiring PIC32MZ Revision B2 Silicon 2020/07/15 10:46:19 (permalink)
0
Also I should clarify...  this is working on the PIC32MZ2048EFH144 but i'm still having similar intermittent enumeration problems with the PIC32MZ2064DAS176.

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.
#7
Jump to:
© 2020 APG vNext Commercial Version 4.5