PIC32MK - Stupid UART/DMA/CPU Design - Be Careful!! - Page 1
Forum section: electronics / general

author: FxDev
author_rank: Regular Contributor
timestamp: May 03, 2020, 12:00:21 am
content: I'm working on this issue over 1 week. Maybe someone is missing about this point and will work a lot. Be sure about what you are using.I wrote it to Micrcohip's forum, I hope they will change their datasheets about that.Quote

author: JPortici
author_rank: Super Contributor
timestamp: May 03, 2020, 06:54:41 am
content: Wow.I was not aware of that thread.I actually do not use DMA much (and mainly i use the "dedicated ones" in ADC,CAN), i mostly run code in interrupts because i need to have the least possible latency, communication is low priority so i just use the buffers.but i still have a project where i want to use onethe PIC32MK is a stillborn with great potential, at a great price point. a MICROCONTROLLER with TWO USB, and a library for it about 3 years after introduction, TONS of ANALOG PERIPHERALS, many of which crippled by new erratas, TONS of communication peripherals, but you have to bitbang I2C with the promise of a fixed IP sometimes in the future and now this dma issue that goes deeper than what the errata says.Also the issues with the cache and memory prevented it from having a tiny bit of grunt. I kept using dsPIC (and an ancient dsPIC33EP MU for USB things) because control loops run faster and less interrupt latency. Plus the dsPIC33C is a crazy beastWhen it came out i was planning to build a small engine ECU but there was basically zero support. No support + bugs -> nobody uses it -> no sales -> no incentives to bring support and fix bugs -> nobody uses it -> ...However, later this year (i think) they are releasing two new families and i think they'll want us to migrate to the new silicon (not that i'll complain about that). It was necessary as they replaced the flash with ECC flash and CAN with CAN FD. So there must be at least one big fish using those chips, so not all is lost. Hopefully more bugs will be fixed

author: FxDev
author_rank: Regular Contributor
timestamp: May 03, 2020, 01:54:22 pm
content: 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.5usFor Float arithmatics: PIC32 (120Mhz): 4us , STM32F334(72MHz): 4us120MHz MIPS32 equal 72MHz Cortex-M4 in core level.Datasheets say, PIC32 @120MHz (198DMIPS), STM32 @72MHz (210DMIPS).So it's very easy to understand.

author: Electrons
author_rank: Contributor
timestamp: November 06, 2021, 03:22:21 pm
content: thank u for mentioning thisI was wondering is this issue a design which they cannot correct it even in later revisions unless they redesigned the core ? or is it a mistake somewhere that could be corrected ?i am asking this since i see that they released the pic32mk xxxx MCM . the errata is clean and the problem is not mentioned , but i am afraid they now state it in the datasheet somewhere hidden in tiny font. Since in figure 1.1 they block diagram of the core and buses looks the same.I really like the new chip and would like to use it and was hopping you could shed some light on the subject.