Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix up SD1 initialization for KL2x #219

Merged
merged 3 commits into from
May 17, 2020

Conversation

twadleigh
Copy link
Contributor

In the case of KINETIS_SERIAL0_IS_UARTLP:

  • the argument to sd_lld_init_driver needs to be explicitly coerced to a pointer of type UART_TypeDef;
  • the initialization of c4_p needs to be patched, as its position is different in the underlying UARTLP_TypeDef.

In the case of KINETIS_SERIAL0_IS_UARTLP:
* the argument to `sd_lld_init_driver` needs to be explicitly coerced to a pointer of type `UART_TypeDef`;
* the initialization of `c4_p` needs to be patched, as its position is different in the underlying `UARTLP_TypeDef`.
@fpoussin fpoussin self-assigned this May 13, 2020
@fpoussin fpoussin added the hal label May 13, 2020
Copy link
Member

@fpoussin fpoussin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually broken:

/home/jenkinsremote/workspace/ChibiOS-Contrib_PR-219@2/os/hal/ports/KINETIS/LLD/UARTv1/hal_serial_lld.c: In function 'sd_lld_init':
/home/jenkinsremote/workspace/ChibiOS-Contrib_PR-219@2/os/hal/ports/KINETIS/LLD/UARTv1/hal_serial_lld.c:434:24: error: 'UARTLP_TypeDef' {aka 'struct <anonymous>'} has no member named 'c4_p'
  434 |   SD1.uart.c4_p = UART0->c4_p;  /* fix up misconfigured C4 register */
      |                        ^~
make: *** [build/obj/hal_serial_lld.o] Error 1

@twadleigh
Copy link
Contributor Author

My apologies for submitting a broken patch. I added it directly by editing on github, working from memory.

I have fixed it and tested it locally.

@twadleigh twadleigh requested a review from fpoussin May 17, 2020 22:33
@fpoussin fpoussin merged commit 0343419 into ChibiOS:chibios-20.3.x May 17, 2020
@fpoussin
Copy link
Member

Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants