• AVR Freaks

Hot!PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!!

Author
FxDev
Power Elec. Eng.
  • Total Posts : 41
  • Reward points : 0
  • Joined: 2016/09/10 02:20:25
  • Location: Planet Terra
  • Status: offline
2020/05/02 16:54:25 (permalink)
0

PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!!

I'm using dsPIC33EP series and MPLABX since Beta version, for nearly 11-12 years. Very good products, love it!
 
Last year Microchip guys came with PIC32MK series. I'm working PIC32MK for one year. PWM + ADCs are great with no problem. I made very huge power converters ext. I liked this MCU believe me until last Week!
 
Last week, I have to use use UART1 and UART2 with DMA and suddenly CPU stops after 5 sec. Sometimes it stops after 20sec. Sometimes it works 20 min. after CPU stops. Can you believe it, it stops! Freezes like a north pole!
 
After that I read Errata DMA section. They explained that PIC32MK Errata number 55.
 
Oh come on guys this is very nuts!
 
Think about that; you gave us 6 UARTs, you commercial like that! So If I want to use any UART1-2-3-... with using RX Interrupt and DMA (because I'm not an Arduino hobbyist, I'm a professional, I have to use DMA) to transfer data, CPU is gonna STALL! Why because CPU and DMA using same Perib. Bus! Ok I can use UART1 to receive and UART5 to transmit, but I cant use any SPI or any ICx interrupt, damn! And believe me you can not find this error with any Pickit3-Pickit4-ICD4 or another sh*tty debuggers programmers.
 
So at the end, you have to think, which PBx is gonna connect to DMA or which PBx is gonna connect to CPU. In my opinion, PB2 has to be controlled with CPU and PB3 has to be responsible for DMA works.
 
This guy has suffered a lot about this! I'm so sorry for him.
https://www.microchip.com/forums/m1121925.aspx
 
Please change your datasheet and errata about that. USE VERY BIG FONT to warn users about that, especially on Figure 1.1.
 
P.S. I have never though I will try to use STM32 someday, but thanks to your designers, today I ordered STM32G4 kits after using Microchip 11-12 years later.
post edited by FxDev - 2020/05/02 16:55:34

www.firatdeveci.com
#1

17 Replies Related Threads

    Stefiff
    Senior Member
    • Total Posts : 99
    • Reward points : 0
    • Joined: 2012/07/15 15:26:29
    • Location: 0
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/05/02 23:15:23 (permalink)
    4.67 (3)
    I sympathize with you. But the rule is simple. When choosing a new processor, the first thing to do is to read the errata file. This is always with me. Ever since my first PIC32MX before many years. That's exactly why I gave up on the first PIC32MZ, the situation was tragic, and I preferred to wait.
    Especially for PIC32MK and PIC32MM, I personally do not know why they produced are. It's very difficult to find something working in them.
     
    About ARM.
    Read their errata file first And they have, and it is by no means short. It's just different. I have a friend who works (professionally) with both types of processors, and I can tell you that the situation is similar. A matter of preference. Most of my friends who work with STM work with them simply because they are already used  them. But listening to their problems, well, no. I do not want to create problems myself.
    STMs are widely used because of the many versions.  Price is similar. The current fastest PIC32MZ is 200MHz, and to me is slow. It must operate over a large temperature range, even at negative temperatures. Several times, I try to go to the ARM. It's not, it's the same commodity. And when they go to Linux, they lose me completely. Someone, somewhere, wrote that an ARM at 500MHz equals to  PIC32 at 200MHz for gpio.
    #2
    NKurzman
    A Guy on the Net
    • Total Posts : 18976
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/05/03 00:13:57 (permalink)
    2 (2)
    A lot off CPUs do not have a bus per DMA channel. I think the pic32mz has 2 internal buses.
    #3
    yyfliu
    New Member
    • Total Posts : 2
    • Reward points : 0
    • Joined: 2009/01/01 04:40:37
    • Location: 0
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/05/03 06:27:58 (permalink)
    0
    Well. PIC32MK uart DMA mode seemed to be a true hardware bug. I've also tried many times and failed on each try. But I still consider PIC32MK to be an excellent 32bit MCU and I still love to use it. The reasons  include: 256KB RAM, 16 OCPWM, 4 CAN, 6 UART, 6 QEI, 6 SPI and flexible PPS configuration. In any way it is much  flexible and versatile compared to STM32F1/F4 series. STM32F4 series also have many annoying hardware problems. My colleges all use STM32 except me. I would not give up PIC32.  And the only thing I hope is that Microchip could provide more detailed examples on peripherals.  Still I'm eagerly to see future PIC32CZ/CA/CX appear.
    #4
    FxDev
    Power Elec. Eng.
    • Total Posts : 41
    • Reward points : 0
    • Joined: 2016/09/10 02:20:25
    • Location: Planet Terra
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/05/03 06:52:50 (permalink)
    0
    I read lots of data about STM32 especially STM32G4 series.
    They explained them in AN4031 and AN2548.
    They are using round robin system for CPU, DMA1 and DMA2 with bus matrix. Very easy solution. For example if CPU and DMA want to access UART1 same time, first CPU access it after DMA, then CPU and so on. Never goes latency or freeze the CPU.
    Maybe it makes to lost 1-2 cycle to access memory or perib. but MCU never goes stall position.
    -----------------------------****************---------------------------
    By the way, I compared PIC32MK and STM32F334.
     
    I have a library for One Phase SOGI-PLL algorithm.
     
    For integer arithmatics (32 bit long): PIC32 (120Mhz): 1,9us - STM32F334(72MHz): 1.5us
    For Float arithmatics: PIC32 (120Mhz): 4us , STM32F334(72MHz): 4us
     
    120MHz MIPS32 equal 72MHz Cortex-M4 in core level.
    Datasheets say, PIC32 @120MHz (198DMIPS), STM32 @72MHz (210DMIPS).
     
    So it's very easy to understand.
     
     
    post edited by FxDev - 2020/05/03 06:57:37

    www.firatdeveci.com
    #5
    FxDev
    Power Elec. Eng.
    • Total Posts : 41
    • Reward points : 0
    • Joined: 2016/09/10 02:20:25
    • Location: Planet Terra
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/09/26 15:57:24 (permalink)
    1 (1)
    PIC32MK1024MCM100
     
    I saw today, microchip released MCM100 series and without DMA/CPU problem. Is that true? I didnt see any DMA issues on errata?

    www.firatdeveci.com
    #6
    DominusT
    Super Member
    • Total Posts : 1456
    • Reward points : 0
    • Joined: 2005/07/22 08:31:18
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/09/28 05:33:46 (permalink)
    4 (1)
    FxDev
    PIC32MK1024MCM100
     
    I saw today, microchip released MCM100 series and without DMA/CPU problem. Is that true? I didnt see any DMA issues on errata?


    Every new product has bugs to discover. I think choosing a new MCU for a serious project is dangerous and it's best to pick something that's at least a year in the market.
    #7
    nsaspook
    Starting Member
    • Total Posts : 58
    • Reward points : 0
    • Joined: 2009/04/30 11:29:47
    • Location: 0
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/10/16 07:03:36 (permalink)
    0
    I'm testing some SPI interface code to a Parallax LSM9DS1 9-axis IMU Module using the  PIC32MK MCJ Curiosity Pro Development board (DT100113)  with the  PIC32MK0512MCJ064. So far the hardware is solid but some numb-skull put the Arduino Uno digital header pins backwards on the DT100113 PCB. The labels are right but none of the electrical pins go to the correct place. LOL
     
    http://ww1.microchip.com/downloads/en/DeviceDoc/PIC32MK-MCJ-Curiosity-Pro-Users-Guide-DS70005421A.pdf
     Arduino Uno R3 compatible interface mad: mad
    #8
    WeHongKongers
    Super Member
    • Total Posts : 261
    • Reward points : 0
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/10/16 08:32:40 (permalink)
    0
    Yes, I run Ubuntu which is one year older than the current version.
    #9
    Murton Pike Systems
    Senior Member
    • Total Posts : 49
    • Reward points : 0
    • Joined: 2020/09/10 02:13:01
    • Location: 0
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/10/17 12:30:48 (permalink)
    5 (1)
    I bough a atsame70 processor with USB.
    It was advertised as having USB and also USB setup is in the data sheet.
    But couldnt get it working so put in a ticket.
    I was told that USB doesnt work on 64 pin processors, I have to use a 100 pin processor.
    I was told to always read errata sheet before designing in a processor.
     
    #10
    DominusT
    Super Member
    • Total Posts : 1456
    • Reward points : 0
    • Joined: 2005/07/22 08:31:18
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/10/17 12:51:51 (permalink)
    0
    nigelwright7558
    I bough a atsame70 processor with USB.
    It was advertised as having USB and also USB setup is in the data sheet.
    But couldnt get it working so put in a ticket.
    I was told that USB doesnt work on 64 pin processors, I have to use a 100 pin processor.
    I was told to always read errata sheet before designing in a processor.
     


    Lately a lot of complaints regarding new microcontrollers. For serious design, choose an MCU that is at least one year old.


    By that time, a lot of information will open both from the manufacturer and from people who bought to do a test.
     
    And the errata thing is something that all manufacturers have and should always be read.
     
    #11
    Murton Pike Systems
    Senior Member
    • Total Posts : 49
    • Reward points : 0
    • Joined: 2020/09/10 02:13:01
    • Location: 0
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/10/17 13:21:27 (permalink)
    5 (1)
    Its a game finding right controller.
    I dont have SMD setup so solder SMD SOIC28's by hand.
    Anything finer pitch is a pain.
    Also the SOIC28's are now no longer stocked by some suppliers.
    On the other hand as you say some of the new stuff is either buggy or is soft.
    I got caught out with a processor not liking inputs pushed past their input current range.
    I remember the days when we poked mains into PIC processors through a resistor with no problems.
     
    I am currently working on an atsame70n19 and I cant get PWM to work so thats with Microchip at the moment.
    Errata sheet has no problems with PWM so  I can only assume I have missed something somewhere.
    Microchip can be a bit slow with their tickets.
     
    #12
    DominusT
    Super Member
    • Total Posts : 1456
    • Reward points : 0
    • Joined: 2005/07/22 08:31:18
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/10/17 13:26:22 (permalink)
    0
    nigelwright7558
    Microchip can be a bit slow with their tickets.
     

    In this I agree since MCHP acquired ATMEL, the support was replaced by others, before they were very nice, now they are the opposite apart from being very slow. Maybe deep down ATMEL was the one who took over MCHP.
     
    Have you started using Silicon Labs MCUs?
    #13
    Murton Pike Systems
    Senior Member
    • Total Posts : 49
    • Reward points : 0
    • Joined: 2020/09/10 02:13:01
    • Location: 0
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/10/17 14:07:12 (permalink)
    0
    DominusT
    Have you started using Silicon Labs MCUs?




    No but  I will look into it.
     
    I did try ATMEL with my PWM problem but they just said its a hardware problem.
    Its clearly not because I can toggle that pin if I make it a GPIO.
    Just fobbed off.
    #14
    DominusT
    Super Member
    • Total Posts : 1456
    • Reward points : 0
    • Joined: 2005/07/22 08:31:18
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/10/17 14:15:53 (permalink)
    0
    nigelwright7558
    DominusT
    Have you started using Silicon Labs MCUs?




    No but  I will look into it.
     
    I did try ATMEL with my PWM problem but they just said its a hardware problem.
    Its clearly not because I can toggle that pin if I make it a GPIO.
    Just fobbed off.


    Someone told me that it is still a small company but the customer service is very good, like in the good days of MCHP.

    I did some research and asked several questions in their forum and I was answered by people who work in the company.

    Also  I opened a technical ticket to ask about a development kit. I was surprised when they called me to explain. That type of treatment that consumers have, regardless of whether you are a large company or if you have a small business, sometimes makes you think about migrating to other manufacturers.
    #15
    NorthGuy
    Super Member
    • Total Posts : 6350
    • Reward points : 0
    • Joined: 2014/02/23 14:23:23
    • Location: Northern Canada
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/10/18 08:11:33 (permalink)
    0
    DominusT
    I did some research and asked several questions in their forum and I was answered by people who work in the company.



    It used to be that way everywhere just 5-10 years back. I remember I asked a question about an op amp on TI forums. A guy from TI called me next day and offered free samples of that chip. When I joined this forum there were many Microchip people, much more than it is now.
    #16
    NKurzman
    A Guy on the Net
    • Total Posts : 18976
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/10/18 09:04:01 (permalink)
    5 (1)
    TI’s tech support is their Forum.
    I found it a bit slow, but you actually got a response from an engineer.
    It’s probably something that Microchip should do more often.

    The problem is for many larger companies they start feeling more and more hobbyist calls. I would assume that starts taking up too much of the engineers time with teach me electronics complaints.
    #17
    DominusT
    Super Member
    • Total Posts : 1456
    • Reward points : 0
    • Joined: 2005/07/22 08:31:18
    • Status: offline
    Re: PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! 2020/10/18 09:41:45 (permalink)
    0
    NKurzman
    TI’s tech support is their Forum.
    I found it a bit slow, but you actually got a response from an engineer.
    It’s probably something that Microchip should do more often.

    The problem is for many larger companies they start feeling more and more hobbyist calls. I would assume that starts taking up too much of the engineers time with teach me electronics complaints.

    That is another problem, there are people who open a technical ticket because they didn't realize that their MPLAB Snap was disconnected from their PC and they assumed that it didn't work after having 'checked' everything.
    #18
    Jump to:
    © 2020 APG vNext Commercial Version 4.5