Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎04-04-2016

howto move UART1 to the remoteproc?



I am trying to use, what would be the Linux serial console, in a FreeRTOS remote application. The problem is getting the interrupts working. Use of the UART has been totally disabled on the Linux side. The serial port has been disabled in the device tree. When FreeRTOS comes up it configures the serial port and performs a loopback test. Everything seems fine but the interrupts are never received. I even tries to force the IRQ routing by:


XScuGic_InterruptMaptoCpu(&xInterruptController, 1, 82); 
XScuGic_Enable(&xInterruptController, 82);


I even tried adding "clk_ignore_unused" in the bootargs. It didn't fix the problem and caused Ethernet to fail?...


Any ideas?

0 Kudos
1 Reply
Registered: ‎04-04-2016

For Those Who May Be Interested....


  1. The key to getting any device to work in AMP is to have it configured in the Linux device tree. If it isn't identified in the device tree, Linux will disable the device.
  2. When connecting an peripheral interrupt for use by the AMP guest on core 1, it may be necessary to map the interrupt to that core. This is accomplished with XScuGic_InterruptMaptoCpu(XScuGic *InstancePtr, u8 Cpu_Id, u32 Int_Id). Unfortunately, if you are using SDK v2015.4, this function has bugs. The function should be....


void XScuGic_InterruptMaptoCpu(XScuGic *InstancePtr, u8 Cpu_Id, u32 Int_Id)
u32 RegValue = XScuGic_DistReadReg(InstancePtr,
XSCUGIC_SPI_TARGET_OFFSET_CALC(Int_Id)); u32 Offset = (Int_Id & 0x3); RegValue = (RegValue & (~(0xFF << (Offset*8))) ); RegValue |= ((Cpu_Id+1) << (Offset*8)); XScuGic_DistWriteReg(InstancePtr, XSCUGIC_SPI_TARGET_OFFSET_CALC(Int_Id), RegValue);

For the particular problem of using the serial port, which is normally assigned as the Linux console:

  1. Do not modify the device tree definition
  2. Disable "getty" in inittab for the serial port
  3. Change the "console=" to one of the virtual ttys in the bootargs

I hope this was useful.




Tags (3)
0 Kudos