July 07, 2022, 07:14:15 am

UART2 on PIC32-OTG

Started by .Costin, August 19, 2014, 11:52:37 am

Previous topic - Next topic

.Costin

August 19, 2014, 11:52:37 am Last Edit: August 19, 2014, 04:51:56 pm by .Costin
Hi, I'm a little bit confused...UART2 is multiplexed on the same pins with the second I2C, but I can't find even in the mcu's datasheet if those pins are open drain or not..I'm asking that becouse I can't make the serial1 readable at no matter what baud rate settings..only strange chars..UART1 is properly doing his job, Serial giving a clean signal at all baud rates...

And I'm wondering why did you choose to run this chip at 60 Mhz instead 80 ?

JohnS

I've the board.  Doesn't run at 60MHz, runs at 80MHz.  Why do you think 60?

I use uart1 often.  No problems.

John

.Costin

Hi, I'm telling that becouse after many failed uart2 sessions, I've spoken with matt, the UECIDE creator, thinking that his IDE is faulty for that strange behaviour..He found some settings made in the bootloader which set the chip at 60Mhz, not 80..Baud rate was at 75% speed from the calculated one, therefore only errors on the uart2...After he changed the configs according to the  60 Mhz speed, everything worked fine...

JohnS

I believe the bootloader sources are readily available so please post the part(s) claimed to be at fault.

Generally if the speed settings are wrong then USB won't work, yet it does...

John

.Costin

Hi,John...Here's the link to the conversation about Serial1 issues I had. Maybe I had understood wrong, but those were the answers..

http://uecide.org/forum/viewtopic.php?f=13&t=191&start=70#p1000

Costin

JohnS

September 30, 2014, 12:58:56 pm #5 Last Edit: September 30, 2014, 05:54:57 pm by JohnS
Isn't that about a non-Olimex bootloader and also non-Pinguino code?  Are you using the Pinguino board in a non-Pinguino environment but failed to say so?

Pinguino uses 80MHz from what I see.  They provide the code so if you don't agree please point me to the Pinguino code you mean.

The thread you gave looks like you replace the Olimex bootloader and/or Pinguino environment so I think it must be the replacement that uses 60MHz or fails to reprogram the way it should, right?

BTW, If there are 2 or 3 specific posts in an 8-page thread I'm happy to read them but I'm not interested to wade through every detail of such a long thread.

So far it looks like when I checked the Pinguino serial port code and checked the speed-setting code I wasted my time.

John