LPUART FreeRTOS peripherals config incomplete

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPUART FreeRTOS peripherals config incomplete

1,541件の閲覧回数
koj
Contributor I

While configuring the LP_FLEXCOMM LPUART peripheral in FreeRTOS mode, the srcclk field is not populated correctly.

The clock source frequency is selected in the drop down list but doesn't appear in the peripherals.h nor the resulting config.

 

lpuart_rtos_config_t LP_FLEXCOMM2_rtos_config = {
.base = LP_FLEXCOMM2_PERIPHERAL,
.srcclk = 0UL,
.baudrate = 115200UL,

 

No errors are reported Problems windows.

0 件の賞賛
返信
4 返答(返信)

1,502件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @koj 

The srcclk value in lpuart_rtos_config_t is used to config the SOURCE CLOCK for LP_FLEXCOMM,

If you use the LP_FLEXCOMM2.

Please config the clock for LP_FLEXCOMM2 first.

BR

Harry

0 件の賞賛
返信

1,483件の閲覧回数
koj
Contributor I

That is exactly what I did and the generated code is incomplete.

There is a bug in the tool.

Here's the output from peripherals.c where you can clearly see the timingConfig in the YAML is configured but that config is not applied to the .srcclk.

/***********************************************************************************************************************
 * LP_FLEXCOMM2 initialization code
 **********************************************************************************************************************/
/* clang-format off */
/* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
instance:
- name: 'LP_FLEXCOMM2'
- type: 'lpflexcomm_lpuart'
- mode: 'freertos'
- custom_name_enabled: 'false'
- type_id: 'lpflexcomm_lpuart_2.3.0'
- functional_group: 'BOARD_InitPeripherals'
- peripheral: 'LP_FLEXCOMM2'
- config_sets:
  - fsl_lpuart_freertos:
    - lpuart_rtos_configuration:
      - timingConfig:
        - clockSource: 'LPFLEXCOMMFunctionClock'
        - lpuartSrcClkFreq: 'BOARD_BootClockPLL150M'
        - baudRateBpsStr: '115200'
      - parity: 'kLPUART_ParityDisabled'
      - stopbits: 'kLPUART_OneStopBit'
      - buffer_size: '512'
      - enableRxRTS: 'true'
      - enableTxCTS: 'true'
      - txCtsSource: 'kLPUART_CtsSourcePin'
      - txCtsConfig: 'kLPUART_CtsSampleAtStart'
      - rx_timeout_constant_ms: '10'
      - rx_timeout_multiplier_ms: '0'
      - tx_timeout_constant_ms: '10'
      - tx_timeout_multiplier_ms: '0'
    - interrupt_rx_tx:
      - IRQn: 'LP_FLEXCOMM2_IRQn'
      - enable_priority: 'true'
      - priority: '3'
 * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS **********/
/* clang-format on */
lpuart_rtos_handle_t LP_FLEXCOMM2_rtos_handle;
lpuart_handle_t LP_FLEXCOMM2_lpuart_handle;
uint8_t LP_FLEXCOMM2_background_buffer[LP_FLEXCOMM2_BACKGROUND_BUFFER_SIZE];
lpuart_rtos_config_t LP_FLEXCOMM2_rtos_config = {
  .base = LP_FLEXCOMM2_PERIPHERAL,
  .srcclk = 0UL,
  .baudrate = 115200UL,
  .parity = kLPUART_ParityDisabled,
  .stopbits = kLPUART_OneStopBit,
  .buffer = LP_FLEXCOMM2_background_buffer,
  .buffer_size = 512UL,
  .enableRxRTS = true,
  .enableTxCTS = true,
  .txCtsSource = kLPUART_CtsSourcePin,
  .txCtsConfig = kLPUART_CtsSampleAtStart,
  .rx_timeout_constant_ms = 10UL,
  .rx_timeout_multiplier_ms = 0UL,
  .tx_timeout_constant_ms = 10UL,
  .tx_timeout_multiplier_ms = 0UL
};

 

0 件の賞賛
返信

1,396件の閲覧回数
Harry_Zhang
NXP Employee
NXP Employee

Hi @koj 

Thanks for your information, i will report this issue.

BR

Harry

0 件の賞賛
返信

1,522件の閲覧回数
koj
Contributor I

MCUXpresso IDE installation details attached.

0 件の賞賛
返信