Skip to content

Add support for STM32L432KC and Nucleo L432KC board #19

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

Merged
merged 4 commits into from
May 8, 2017

Conversation

superna9999
Copy link
Collaborator

@superna9999 superna9999 commented Apr 29, 2017

The STM32L4x2 SoC serie is a lowered down version of the STM32L4x6 SoCs.

This PR adds support for the STM32L432KC SoC and support for the Nucleo L432KC from the Nucleo-32 boards serie.
Documentation for the Nucleo L432KC is added based on the Nucleo L476RG format.


This change is Reviewable

@nashif nashif requested a review from dbkinder April 29, 2017 20:46
@galak galak self-assigned this Apr 29, 2017
- Ultra-low-power with FlexPowerControl (down to 28 nA Standby mode and 84 μA/MHz run mode)
- Core: ARM® 32-bit Cortex®-M4 CPU with FPU, frequency up to 80 MHz, 100DMIPS/1.25DMIPS/MHz (Dhrystone 2.1)
- Clock Sources:
- 32 kHz crystal oscillator for RTC (LSE)
Copy link
Contributor

Choose a reason for hiding this comment

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

Lists (and sub-lists) need a blank line before and after the lists, so add a blank line before - 32 kHz

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok

- Internal low-power 32 kHz RC (±5%)
- Internal multispeed 100 kHz to 48 MHz oscillator, auto-trimmed by LSE (better than ±0.25 % accuracy)
- 2 PLLs for system clock, USB, audio, ADC
- RTC with HW calendar, alarms and calibration
Copy link
Contributor

Choose a reason for hiding this comment

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

add a blank like after the (sub)list ends and before - RTC

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok

- RTC with HW calendar, alarms and calibration
- Up to 3 capacitive sensing channels: support touchkey, linear and rotary touch sensors
- 11x timers:
- 1x 16-bit advanced motor-control
Copy link
Contributor

Choose a reason for hiding this comment

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

add a blank line before this sublist

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok

- 2x low-power 16-bit timers (available in Stop mode)
- 2x watchdogs
- SysTick timer
- Up to 26 fast I/Os, most 5 V-tolerant
Copy link
Contributor

Choose a reason for hiding this comment

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

... and a blank line after the sublist

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok

- SysTick timer
- Up to 26 fast I/Os, most 5 V-tolerant
- Memories
- Up to 256 KB single bank Flash, proprietary code readout protection
Copy link
Contributor

Choose a reason for hiding this comment

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

Add blank line before and after the sublist... same for the sublists below

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok

- 2x SPIs (3x SPIs with the Quad SPI)
- CAN (2.0B Active)
- SWPMI single wire protocol master I/F
- IRTIM (Infrared interface)
Copy link
Contributor

Choose a reason for hiding this comment

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

indent needs to match previous line

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok

- Arduino Uno V3 connectivity
- On-board ST-LINK/V2-1 debugger/programmer with SWD connector
- Flexible board power supply:
- USB VBUS or external source(3.3V, 5V, 7 - 12V)
Copy link
Contributor

Choose a reason for hiding this comment

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

sublists should have a blank like before and after htem

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok

Copy link
Contributor

@dbkinder dbkinder left a comment

Choose a reason for hiding this comment

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

A few formatting tweaks, otherwise looks OK

Copy link
Contributor

@dbkinder dbkinder left a comment

Choose a reason for hiding this comment

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

+1

#define CONFIG_NUM_IRQ_PRIO_BITS ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS

#define CONFIG_UART_STM32_PORT_1_BASE_ADDRESS ST_STM32_USART_40013800_BASE_ADDRESS
#define CONFIG_UART_STM32_PORT_1_BAUD_RATE ST_STM32_USART_40013800_BAUD_RATE
Copy link
Member

Choose a reason for hiding this comment

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

Rename ST_STM32_USART_40013800_BAUD_RATE as ST_STM32_USART_40013800_CURRENT_SPEED

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok

#define PORT_1_IRQ ST_STM32_USART_40013800_IRQ_0

#define CONFIG_UART_STM32_PORT_2_BASE_ADDRESS ST_STM32_USART_40004400_BASE_ADDRESS
#define CONFIG_UART_STM32_PORT_2_BAUD_RATE ST_STM32_USART_40004400_BAUD_RATE
Copy link
Member

Choose a reason for hiding this comment

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

same here

#define PORT_2_IRQ ST_STM32_USART_40004400_IRQ_0

#define CONFIG_UART_STM32_PORT_3_BASE_ADDRESS ST_STM32_USART_40004800_BASE_ADDRESS
#define CONFIG_UART_STM32_PORT_3_BAUD_RATE ST_STM32_USART_40004800_BAUD_RATE
Copy link
Member

Choose a reason for hiding this comment

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

same here

#define PORT_3_IRQ ST_STM32_USART_40004800_IRQ_0

#define CONFIG_UART_STM32_PORT_4_BASE_ADDRESS ST_STM32_USART_40004C00_BASE_ADDRESS
#define CONFIG_UART_STM32_PORT_4_BAUD_RATE ST_STM32_USART_40004C00_BAUD_RATE
Copy link
Member

Choose a reason for hiding this comment

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

same here

Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

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

Sorry previous comment. I only ment to +1 only first commit.
Removing the "approved on all changes"

Copy link
Collaborator

@galak galak left a comment

Choose a reason for hiding this comment

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

The SoC and Board bits should be split, so that the board.dts, dts/arm/Makefile, fixup, are part of the patch that adds the board to Zephyr.

@superna9999 superna9999 force-pushed the stm32l432_nucleo branch 2 times, most recently from ef77407 to 2dfc637 Compare May 3, 2017 07:51
@superna9999
Copy link
Collaborator Author

@galak it seems the shippable script throws me errors on commits not part of this PR

@pfalcon pfalcon mentioned this pull request May 3, 2017
@galak galak force-pushed the arm branch 2 times, most recently from 78c0221 to a1c74b7 Compare May 4, 2017 14:02
Copy link
Collaborator

@galak galak left a comment

Choose a reason for hiding this comment

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

So the patch sequence seems out of order here:
The board patch should be last. I'd expect:

  1. pinmux: stm32: Do not compile PORTD when not available
  2. arm: stm32l4: Add configuration for STM32L432XX
    (merge dts: Add support for STM32L432)
  3. pinmux: stm32: Add support for Nucleo L432KC
  4. boards: arm: Add Nucleo L432KC (merge dts: Add support for Nucleo L432KC)

The STM32L432 does not have a PORTD gpio, disable it when not available.

Signed-off-by: Neil Armstrong <[email protected]>
Add configuration and dts for the STM32L432XX SoC STM32L4 variant.

Signed-off-by: Neil Armstrong <[email protected]>
Add pinmux configuration for the Nucleo L432KC board

Signed-off-by: Neil Armstrong <[email protected]>
@superna9999
Copy link
Collaborator Author

Hmm, when pushing partial rebase, the order showed in the PR is wrong..

On the original branch (https://github.com/superna9999/zephyr/commits/stm32l432_nucleo) , the commits are:
1f9bafd boards: arm: Add support for Nucleo L432KC
b0de4a3 pinmux: stm32: Add support for Nucleo L432KC
7f2fff1 arm: stm32l4: Add configuration and dts for STM32L432XX
3106ca4 pinmux: stm32: Do not compile PORTD when not available

But the shippable status is on the good commit.

Add configuration, dts and documentation for the Nucleo L432KC board
based on the STM32L432KC SoC.

Signed-off-by: Neil Armstrong <[email protected]>
Copy link
Collaborator

@galak galak left a comment

Choose a reason for hiding this comment

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

Looks, good - let me see about dbkinder adding his approval

Copy link
Contributor

@dbkinder dbkinder left a comment

Choose a reason for hiding this comment

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

I guess just leaving a +1 comment doesn't work, so I'll pick the Approve button this time 👍

@galak galak merged commit 2187c1c into zephyrproject-rtos:arm May 8, 2017
mike-scott pushed a commit to mike-scott/zephyr that referenced this pull request May 30, 2017
frasa pushed a commit to blik-GmbH/zephyr that referenced this pull request Mar 25, 2019
feat: ci: add gitlint and stylecheck

Closes zephyrproject-rtos#19, zephyrproject-rtos#22, and zephyrproject-rtos#23

See merge request blik/embedded/zephyr!26
carlescufi added a commit to carlescufi/zephyr that referenced this pull request Apr 30, 2020
Certain Qualcomm controllers do not accept our settings for Host Buffer
Size:

< HCI Command: Host Buffer Size (0x03|0x0033) plen 7       zephyrproject-rtos#19 [hci0]
22.391048
        ACL MTU: 27   ACL max packet: 6
        SCO MTU: 0    SCO max packet: 0
> HCI Event: Command Complete (0x0e) plen 4                zephyrproject-rtos#20 [hci0]
22.391525
      Host Buffer Size (0x03|0x0033) ncmd 1
        Status: Invalid HCI Command Parameters (0x12)

Likely due to the fact that we do not reserve space for any SCO packets
in the Host.

Other Controllers (Realtek) seem to not transmit any data at all in the
Controller to Host direction if Controller to Host flow control is
enabled.

Document this fact in the User Guide so that users know what to do when
this happens.

Signed-off-by: Carles Cufi <[email protected]>
jhedberg pushed a commit that referenced this pull request Apr 30, 2020
Certain Qualcomm controllers do not accept our settings for Host Buffer
Size:

< HCI Command: Host Buffer Size (0x03|0x0033) plen 7       #19 [hci0]
22.391048
        ACL MTU: 27   ACL max packet: 6
        SCO MTU: 0    SCO max packet: 0
> HCI Event: Command Complete (0x0e) plen 4                #20 [hci0]
22.391525
      Host Buffer Size (0x03|0x0033) ncmd 1
        Status: Invalid HCI Command Parameters (0x12)

Likely due to the fact that we do not reserve space for any SCO packets
in the Host.

Other Controllers (Realtek) seem to not transmit any data at all in the
Controller to Host direction if Controller to Host flow control is
enabled.

Document this fact in the User Guide so that users know what to do when
this happens.

Signed-off-by: Carles Cufi <[email protected]>
hakehuang referenced this pull request in hakehuang/zephyr Jun 20, 2020
Certain Qualcomm controllers do not accept our settings for Host Buffer
Size:

< HCI Command: Host Buffer Size (0x03|0x0033) plen 7       #19 [hci0]
22.391048
        ACL MTU: 27   ACL max packet: 6
        SCO MTU: 0    SCO max packet: 0
> HCI Event: Command Complete (0x0e) plen 4                #20 [hci0]
22.391525
      Host Buffer Size (0x03|0x0033) ncmd 1
        Status: Invalid HCI Command Parameters (0x12)

Likely due to the fact that we do not reserve space for any SCO packets
in the Host.

Other Controllers (Realtek) seem to not transmit any data at all in the
Controller to Host direction if Controller to Host flow control is
enabled.

Document this fact in the User Guide so that users know what to do when
this happens.

Signed-off-by: Carles Cufi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants