Uart

Postby karmeij » Sat Jan 02, 2010 12:00 am

I'm sorry to adress this forum in english, but believe me, you would be sorry if I did it in german. (my german teacher is very sorry too, by the way).

I've been trying to get a uart working with Glyn's R32C-evaluation board. I've tried numerous of things, including the UART1 sample code of HAD (thanks for posting that). I must be doing wrong a very basic thing, cause I can't get uart 1, 3 or 5 working. Nor in debugging mode in conjunction with the KD100 monitor, nor as a indepently working program.

I've added one of the many failing c-sources.

Does the KD100 monitor program interfere with timed operations like a uart, and is it possible at all to operate a uart in conjunction with the KD100-debugger?
Are there any other things that need to be set correctly in any dependend file like sect100.inc or ncrt0.a30?

Any pointers would be greatly appreciated, as would be additional working code examples.

Thanks, Karst
Attachments
uart-test.c
(1.76 KiB) Downloaded 69 times
karmeij
 
Posts: 6
Joined: Fri Jan 03, 2014 1:48 pm

Postby fjl2 » Sat Jan 02, 2010 12:00 am

Hello,

you should look at the R8C-forum. Or look at the application notes. There is code for solving your problem.

cu
Franz-Josef
fjl2
 
Posts: 17
Joined: Fri Jan 03, 2014 1:49 pm

Postby karmeij » Mon Jan 04, 2010 12:00 am

Thanks for your respons.
My main problem is that I think I understand the workings of the uart, but reality refuses to correspond with my understanding.

So either I have to change my understanding or change the reality.

I'll start checking the hardware, HEW settings, all inc files and so on.

I'll let you all know if I find something. In the meanwhile all help or tips are deeply appreciated.

Karst
karmeij
 
Posts: 6
Joined: Fri Jan 03, 2014 1:48 pm

Postby gdv » Mon Feb 01, 2010 12:00 am

Hi,

I suspect that KD100 uses UART 1 to communicate with the PC (using the USB connection)

For UART 3, 5 and 8, you must have a look to ifs0, ifs2 registers because by degfault, I/Os are used by timer A

Hope this will help

Gilles
gdv
 
Posts: 10
Joined: Fri Jan 03, 2014 1:49 pm

Postby karmeij » Sun Feb 28, 2010 12:00 am

Hi Gilles,

Your answer did help greatly. It did point me in the right direction. Probably a beginners mistake, but I didn't set the P6_3S register (for txd0).

Problem solved, thanks, Karst
karmeij
 
Posts: 6
Joined: Fri Jan 03, 2014 1:48 pm


Return to R32C-Projekt

Who is online

Users browsing this forum: No registered users and 1 guest