PIC32MZ2048EFM144 UART problem (incorrect remap pins) (SOLVED)

An area to discuss 32-bit PIC specific problems and examples

Moderator: Benj

Post Reply
Lagoda
Posts: 170
Joined: Fri Jul 15, 2016 9:51 pm
Has thanked: 69 times
Been thanked: 61 times
Contact:

PIC32MZ2048EFM144 UART problem (incorrect remap pins) (SOLVED)

Post by Lagoda »

Hello,

I would like to ask for help.
If I set the UART to "Channel 6" in the attached program, it can not receive the characters. If I set channel of UART to "Software", it works perfectly. The external clock of the MCU is 14.7456 MHz.
I also attached the clock settings.

( I tested the UART transmitting direction also with these settings, it worked in both cases.)

Best Regards,

Lagoda
Attachments
Clock setup.jpg
Clock setup.jpg (178.38 KiB) Viewed 7804 times
RS232 and SPI.fcfx
(12.82 KiB) Downloaded 251 times
Last edited by Lagoda on Thu Dec 07, 2017 1:40 pm, edited 1 time in total.

Lagoda
Posts: 170
Joined: Fri Jul 15, 2016 9:51 pm
Has thanked: 69 times
Been thanked: 61 times
Contact:

Re: PIC32MZ2048EFM144 UART problem

Post by Lagoda »

:cry:

Lagoda
Posts: 170
Joined: Fri Jul 15, 2016 9:51 pm
Has thanked: 69 times
Been thanked: 61 times
Contact:

Re: PIC32MZ2048EFM144 UART problem

Post by Lagoda »

:D I found the cause of the mistake!

The Rx input of the UART6 I set in the Flowcode to the RD5 pin, but in fact the RB6 was activating.
When I checked the content of the U6RXR register I found 0x05 instead of 0x06.
I corrected the value to 0x06 in source C and then it worked.
Unfortunately I do not know where and how storing datas of Mapping Table in Flowcode, so that I can correct it.
If you think I'm happy to help you check the related values, if you tell me the way, because I want to use the revised version as soon as possible.

I started a project with this MCU and would like to use Flowcode for development.
In the project I need to use 6 UART, 6 SPI, 2 PWM and 3 A / D channels.
I think I will have more questions. :wink:

Best Regards,

Lagoda

stefan.erni
Valued Contributor
Valued Contributor
Posts: 654
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 182 times
Been thanked: 179 times
Contact:

Re: PIC32MZ2048EFM144 UART problem

Post by stefan.erni »

Hi Lagonda

I have more or less the same CPU. PIC32MZ2048EFG100.

Herre are my measurements .....
viewtopic.php?f=7&t=19541

A little tip to the IRQ. Take a look at the compieler option of Micromips and MIPS32
viewtopic.php?f=7&t=19508

regards

Stefan

Lagoda
Posts: 170
Joined: Fri Jul 15, 2016 9:51 pm
Has thanked: 69 times
Been thanked: 61 times
Contact:

Re: PIC32MZ2048EFM144 UART problem

Post by Lagoda »

Hi Stefan,

Thank you very much for the informations.
The knowledge that you share will be useful to me as well.
I'm glad you work with this MCU family and there I'm not alone on the forum with the problems. :)

I'm begining of the work , now testing the peripherals.

Best Regards,
Lagoda
Last edited by Lagoda on Mon Dec 04, 2017 2:18 am, edited 1 time in total.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: PIC32MZ2048EFM144 UART problem

Post by Benj »

Hi Lagoda,

Right I have found a fixed the incorrect remap pins. It effected a lot of devices so it's a nice find.

Simply extract the contents of the attached archive into your "Flowcode 7/FCD/PIC32" folder and restart Flowcode to load the changes.
PIC32.zip
(331.03 KiB) Downloaded 258 times

Lagoda
Posts: 170
Joined: Fri Jul 15, 2016 9:51 pm
Has thanked: 69 times
Been thanked: 61 times
Contact:

Re: PIC32MZ2048EFM144 UART problem (incorrect remap pins) (SOLVED)

Post by Lagoda »

Hi Ben,

Super! :D

I tried just a few pins, but they worked.

Thank you very much.

Lagoda

Post Reply