Unable to get usart0 working

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have followed several of the threads here about getting the additional uarts working on my ngw100.

I have modded both at32ap700x.c and setup.c to add all 4 uarts, and I have now got usart1 (ttyS0), usart2 (ttyS2) and usart3 (ttyS3) all working. :)

But I cannot get usart0 (ttyS1) going. :cry:

The kernel does not hang (as seen on other threads), and I can echo strings (or redirect dmesg) to /dev/ttyS1, but I see nothing on the output pin using a scope.

I have tried changing the TWI / GPIO kernel setting, as well as commenting out the TWI setup line.

I have also removed the LED support from the kernel.

But still no joy.

Can anyone suggest what I might be doing wrong ?

Do I have to change the GPIO registers somehow when using usart0 ? Or should it just work with what I have done ?

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You need to change the board code in arch/avr32/boards/atngw100/setup.c, and add the calls to maping and add devices.

There was a bug discovered in the machine code (at32ap700x.c) where the irq number was wrong IIRC. The patch was posted on the avr32 kernel mailing list.

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think I've made the changes (as per the other threads) to both setup.c and at32ap700x.c files.

But it *still* doesn't work.

Do I have to set the GPIO registers to make the TX an output and RX an input ?

I'm assuming not (since the other serial ports work), but usart0 is shared with the TWI port, so I was wondering if the TWI setup code might "interfere" with the serial port setup ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, if both devices uses the same pin, it will interfere with each other. You should get an error message while booting the kernel about pin allocation failure or similar.

Could you post your changes as patches, it is easier to see what you have done then.

Hans-Christian

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ahem ... problem fixed !!

It does help if I look on the correct pins !!

Sorry for wasting everyone's time ... :oops: :oops: :oops: