AnsweredAssumed Answered

K22 forced hard fault while configuring uart0

Question asked by Mikhail Burakov on Mar 28, 2014
Latest reply on Apr 11, 2014 by Mikhail Burakov

Hello dear community!

 

Our HW guys decided to switch from K20 to K22. I started to adopt my code to this new MCU, but stuck right at the beginning. I get forced hard fault on writing to UART0_AP7816A_T0 during UART0 initialization. The code was generated by PE and it pretty straightforward:

...

  /* UART0_WF7816: GTFD=1 */

  UART0_WF7816 = UART_WF7816_GTFD(0x01);

  /* UART0_ET7816: TXTHRESHOLD=0,RXTHRESHOLD=0 */

  UART0_ET7816 = (UART_ET7816_TXTHRESHOLD(0x00) | UART_ET7816_RXTHRESHOLD(0x00));

  /* UART0_AP7816A_T0: ADTI_H=0 */

  UART0_AP7816A_T0 = UART_AP7816A_T0_ADTI_H(0x00);

...

 

SCB_CFSR 0x00008200

SCB_HFSR 0x40000000

SCB_BFAR 0x4006a03a

 

This happens right in the PE_low_level_init() and only generated code is executed before this fault. Can someone shed a light on this behaviour? Maybe I am missing some simple thing? Or maybe it is a hardware problem?

Outcomes