Possible bug / missing feature in CMSIS UART Driver for LPC1769

I have made some changes to the RTE_Device.h that are necessary for my UART transmission to work properly. Unfortunately I cannot set this via the API in Driver_USART.h. Will these changes be overwritten or will I have to write functions to implement these changes to the RTE_Device.h?

Actually I think it is a bug or missing feature that this cannot be set. The FCR register of the LPC1769 cannot be written to. When I change values of the registers in the drop down menu in Periphals --> UART0, it goes back to the initial value. I had to manually write to this register in the RTE_Device.h and now it works. All the other registers can be set here without issues. 

There is a function getCapabilites() to read the capabilites of the driver, but there is no possibility to set these capabilites. Maybe I am missing something. I have searched everywhere.

Parents
  • getCapabilities() reports the capabilities defined in and by the driver source (UART_17xx.c), which should be visible in your project as a read-only file. The driver has limited ability to change behavior (DMA vs. non-DMA, for example), but that's it. That means you can't change how it handles FCR (as an example) unless you write a new driver (which is not impossible).

    I don't know why you would need to modify RTE_Driver.h (I can guess, but you didn't explain). If you're trying to change the trigger level, define the level you want in your build script using the pre-processor. This is explained in the UART_17xx.c file. There's no rule preventing you from modifying registers outside driver functions. But it could upset the driver state, so be careful. 

    As for weird behavior with changing FCR from the peripheral view -- well, sometimes the code that implements the peripheral viewer has bugs. If you think there's a valid bug there, raise it with ARM support and it'll get fixed, eventually. Meanwhile, the workaround is to do what you did and explicitly update FCR, either from code or from a memory window.

Reply
  • getCapabilities() reports the capabilities defined in and by the driver source (UART_17xx.c), which should be visible in your project as a read-only file. The driver has limited ability to change behavior (DMA vs. non-DMA, for example), but that's it. That means you can't change how it handles FCR (as an example) unless you write a new driver (which is not impossible).

    I don't know why you would need to modify RTE_Driver.h (I can guess, but you didn't explain). If you're trying to change the trigger level, define the level you want in your build script using the pre-processor. This is explained in the UART_17xx.c file. There's no rule preventing you from modifying registers outside driver functions. But it could upset the driver state, so be careful. 

    As for weird behavior with changing FCR from the peripheral view -- well, sometimes the code that implements the peripheral viewer has bugs. If you think there's a valid bug there, raise it with ARM support and it'll get fixed, eventually. Meanwhile, the workaround is to do what you did and explicitly update FCR, either from code or from a memory window.

Children
More questions in this forum