Part Number: AM5728
Other Parts Discussed in Thread: SYSBIOS
Tool/software: TI-RTOS
Hello,
I'd like to use UART10 with the interrupt driver sysbios drivers.
Linux takes care of the iomux and the irq crossbar config.
To make the UART10 accessible I use a custom rsc_table.h and added:
#define UART10_CFG_REGS 0x4AE00000
#define UART10_CFG_REGS_VIRT (UART10_CFG_REGS)
and:
{
TYPE_DEVMEM,
UART10_CFG_REGS_VIRT, UART10_CFG_REGS,
SZ_1M, 0, 0, "UART10_REGS",
},
In my Ipu1.cfg I added:
var socType = "am572x";
var Uart = xdc.loadPackage('ti.drv.uart');
Uart.Settings.socType = socType;
In my C file I used:
#include <ti/drv/uart/src/v1/UART_v1.h> // defines UART_HwAttrs
#include <ti/drv/uart/UART.h>
#include <ti/drv/uart/src/UART_osal.h>
#include <ti/csl/hw_types.h>
#include <ti/csl/soc.h>
UART_HwAttrs uart_hwAttrs;
UART_socGetInitCfg(UART_INSTANCE, &uart_hwAttrs);
uart_hwAttrs.baseAddr = 0x6AE2B000;
UART_socSetInitCfg(UART_INSTANCE, &uart_hwAttrs);
That seems to take care of the wrong default address offset. This approach works fine for I2C
Now I set the IRQ crossbar up to route UART10_IRQ (221) to IPU1_IRQ32 (0x4A0027F0 is 0xDD0000).
By reading the source I found HwAttrs.eventId and intNum but no documentation on those fields.
UART_open fails with:
[0][ 6.650] [t=0xa213533f] ti.sysbios.family.arm.m3.Hwi: ERROR: line 1104: E_hardFault: FORCED
[0][ 6.650] ti.sysbios.family.arm.m3.Hwi: line 1104: E_hardFault: FORCED
[0][ 6.650] [t=0xa2160591] ti.sysbios.family.arm.m3.Hwi: ERROR: line 1216: E_usageFault: INVSTATE: Invalid EPSR and instructio
n combination
How do I tell the sysbios uart driver / interrupt handler that the UART10 IRQ will be on IPU1_IRQ32?
Best regards,
Lo2