PIC32MZ2048EFM144 UART problem (incorrect remap pins) (SOLVED)

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

Moderator: Benj

Lagoda
Posts: 141
Joined: Fri Jul 15, 2016 9:51 pm
Has thanked: 60 times
Been thanked: 54 times
Contact:

PIC32MZ2048EFM144 UART problem (incorrect remap pins) (SOLVED)

Postby Lagoda » Thu Nov 23, 2017 1:07 pm

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 2039 times
RS232 and SPI.fcfx
(12.82 KiB) Downloaded 34 times
Last edited by Lagoda on Thu Dec 07, 2017 1:40 pm, edited 1 time in total.

Lagoda
Posts: 141
Joined: Fri Jul 15, 2016 9:51 pm
Has thanked: 60 times
Been thanked: 54 times
Contact:

Re: PIC32MZ2048EFM144 UART problem

Postby Lagoda » Fri Nov 24, 2017 6:42 pm

:cry:

Lagoda
Posts: 141
Joined: Fri Jul 15, 2016 9:51 pm
Has thanked: 60 times
Been thanked: 54 times
Contact:

Re: PIC32MZ2048EFM144 UART problem

Postby Lagoda » Sun Nov 26, 2017 6:20 pm

: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
These users thanked the author Lagoda for the post:
Benj (Thu Dec 07, 2017 9:18 pm)
Rating: 5.56%
 

stefan.erni
Posts: 496
Joined: Fri Aug 19, 2016 2:09 pm
Location: switzerland
Has thanked: 157 times
Been thanked: 143 times
Contact:

Re: PIC32MZ2048EFM144 UART problem

Postby stefan.erni » Mon Nov 27, 2017 10:38 am

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
These users thanked the author stefan.erni for the post (total 2):
Lagoda (Tue Nov 28, 2017 12:53 am) • Benj (Thu Dec 07, 2017 9:19 pm)
Rating: 11.11%
 

Lagoda
Posts: 141
Joined: Fri Jul 15, 2016 9:51 pm
Has thanked: 60 times
Been thanked: 54 times
Contact:

Re: PIC32MZ2048EFM144 UART problem

Postby Lagoda » Mon Nov 27, 2017 4:12 pm

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: 14151
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4330 times
Been thanked: 4080 times
Contact:

Re: PIC32MZ2048EFM144 UART problem

Postby Benj » Fri Dec 01, 2017 1:32 pm

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.04 KiB) Downloaded 46 times
These users thanked the author Benj for the post (total 2):
stefan.erni (Fri Dec 01, 2017 1:48 pm) • Lagoda (Fri Dec 01, 2017 4:47 pm)
Rating: 11.11%
 

Lagoda
Posts: 141
Joined: Fri Jul 15, 2016 9:51 pm
Has thanked: 60 times
Been thanked: 54 times
Contact:

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

Postby Lagoda » Thu Dec 07, 2017 1:48 pm

Hi Ben,

Super! :D

I tried just a few pins, but they worked.

Thank you very much.

Lagoda
These users thanked the author Lagoda for the post:
Benj (Thu Dec 07, 2017 9:18 pm)
Rating: 5.56%