This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2640: CC2640 UARTIntRegister error

Part Number: CC2640

Hi!

I working with CC2640 periph in "low level". For UART I tying registering interruption func:
UARTIntRegister(UART0_BASE, HAL_UART0_vector);

But after building I got linker error

 :

Can you explain what the problem is and how to fix it? IDE IAR 7.8, SDK ble_sdk_2_02_05_02

  • Additional, I trying create HWI for UART:

    Error_init(&eb);
    Hwi_Params_init(&hwiParams);
    hwiParams.eventId = 21;
    hwiParams.priority = 10;
    hwiParams.arg = 21;
    hwiParams.enableInt = true;
    hwi0 = Hwi_create(INT_UART0_COMB, &HAL_UART0_Int, &hwiParams, &eb);

    HWI is creating, but in viewer priority for UART is 0 and inrerrupt is not work:

  • Hi Alex,

    The link error seems to be due to a symbol overlapping an other. I wonder if some misunderstanding could cause this. I guess you want to add the address of the function in the ramVectors. You don't want to store the function itself in the ramVectors. 

    For the priority of the HWI, unless you want a zero-latency interrupt, I would suggest to use at least 16 as priority. I haven't managed to find my sources back but the priorities of the HWI are not set using the raw value passed into hwiParams.priority. Only certain bits are used. I let you try this :)

    Best regards,

  • Hi Clément!

    Sorry, I didn't understand your answer. May I ask a question differently?

    My task is to write a proprietary driver for UART, which should work in the BLE Central project for CC2640. I need a compact driver, because my application consumes a lot of Flash and RAM

    I wrote the driver, but I can't register the interrupt.

    I have tried registering an interrupt using the function UARTIntRegister(UART0_BASE, HAL_UART0_Int), but I got linker error when calling this function (IAR 7.8). This problem manifests itself in any projects for the IAR (I checked simple_peripheral, simple_central).

    After, I trying create HWI for UART, HWI is crating (I used default params), but interrupt is not trigerring:
    Error_init(&eb);
    myHwi = Hwi_create(INT_UART0_COMB, &HAL_UART0_Int, NULL, &eb);

    Can you describe, how create interrupt "vector" for UART in BLE, if I need proprietarry driver, please?

  • I just disable POWER_SAVING and now all work well -_-

  • Thank you for sharing. It is really appreciated!

    Best regards,