interrupt map to cpu1

interrupt map to cpu1

Home Forums Real-Time Kernels interrupt map to cpu1

This topic contains 2 replies, has 2 voices, and was last updated by  mike tran 1 week ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #26829

    mike tran
    Participant

    Hi UCOS,

    vivado/sdk/petalinux 2017.4, Microzed(7020), Xilinx SDK Repository 1.43

    I am working on AMP project (Petalinux on cpu0 and UCOS app on cpu1) with Microzed. UCOS app (on ps7_cortexa9_1) will read/write files from sd card, and the file system in use is borrowed from UCOS (Xilinx SDK Repository 1.43).

    After Petalinux boot, cpu1 will wake up,However UCOS app hung @ “Initializing SDCard”

    cpu1:

    UCOS – uC/OS Init Started.
    UCOS – STDIN/STDOUT Device Initialized.
    UCOS – Initializing uC/FS.
    UCOS – uC/FS initialization successful.
    UCOS – Initializing SDCard.

    at the same time, cpu0 (linux):

    root@MYPROJECT:~# unexpected IRQ trap at vector 00

    root@MYPROJECT:~#

    Xilinx engineer suggests that I should map the sd card interrupt to cpu1 if it were a Xilinx SDK project, i.e., using the command “XScuGic_InterruptMaptoCpu(GicInstancePtr, 1, GpioIntrId);” which connect a gpio interrupt to cpu1 rather than default to cpu0.

    I am wondering whether UCOS has similar command mapping interrupt to cpu1.

    Please advise, thanks in advance.

    Mike

    #26860

    Farukh Chaudhry
    Participant

    Mike,

    It sounds like you need to update the BSP code or initialization code to map the interrupt.

    Regards

    Farukh

    #26862

    mike tran
    Participant

    Hi Farukh Chaudhry,

    Thank you for the suggestion. However, how can I “update the BSP code or initialization code to map the interrupt” ? Would you mind giving detailed instruction? Thanks in advance.

    In the meantime, I did another test with the original final app.c downloaded from – https://doc.micrium.com/display/UCOSXSDK/uCOS+BSP+on+the+Zynq-7000+Tutorial

    Under AMP, Timer0 interrupt is successfully triggered, however, program never catches Timer1 interrupt. UART outputs as follows,

    UCOS – uC/OS Init Started.
    UCOS – STDIN/STDOUT Device Initialized.
    UCOS – UCOS init done
    UCOS – Total configured heap size. 512
    UCOS – Total used size after init. 284
    Hello world from the main task
    Timer0Task reached
    Timer1Task reached
    Timer 0 Semaphore signaled
    Timer 0 Semaphore signaled
    Timer 0 Semaphore signaled
    Timer 0 Semaphore signaled

    Comparing the source codes of two timers,

    Timer0 = AXITimer_Init(0);
    AXITimer_OptSet(Timer0, 0, AXITIMER_OPT_DOWN | AXITIMER_OPT_AUTO_RELOAD | AXITIMER_OPT_INT);
    AXITimer_LoadSet(Timer0, 0, 100000000);
    AXITimer_CallbackSet(Timer0, 0, Timer0ISR);
    AXITimer_Start(Timer0, 0);

    XTmrCtr_Initialize(&Timer1, 0);
    XTmrCtr_SetOptions(&Timer1, 0, XTC_DOWN_COUNT_OPTION | XTC_AUTO_RELOAD_OPTION | XTC_INT_MODE_OPTION);
    XTmrCtr_SetResetValue(&Timer1, 0, 50000000);

    UCOS_IntVectSet(62, 0, DEF_BIT_00, Timer1ISR, &Timer1);
    UCOS_IntSrcEn(62);

    XTmrCtr_Start(&Timer1, 0);

    Still having problem of mapping interrupt 62 to cpu1.

    Please advise, thanks in advance,

    Mike

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

View the complete site map

x
Loading...