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

[wip]add pinconfig and hal for gd32c10xxx #13

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

feilongfl
Copy link
Contributor

Hi!
this PR add support for gd32c10xxx device and old gd32e103xx device.

hal code from:
http://www.gd32mcu.com/cn/download/7?kw=GD32C1
-> GD32C10x Firmware Library V1.0.1

I made some modifications to hal code with reference to #6

Add pin configurations for the GD32C103XX SoCs.

Signed-off-by: YuLong Yao <[email protected]>
dt-bindings: add pinctrl gd32c403xx generated headers
Signed-off-by: YuLong Yao <[email protected]>
gd32c103: add gd32c1xx hal code from gigadevice website.
Signed-off-by: YuLong Yao <[email protected]>
hal,gd32c103:fix `timer` and `can` module

Signed-off-by: YuLong Yao <[email protected]>
@feilongfl feilongfl changed the title add pinconfig and hal for gd32c10xxx [wip]add pinconfig and hal for gd32c10xxx Nov 24, 2021
* SPDX-License-Identifier: Apache 2.0
*/

#include "gd32c103xx-afio.h"
Copy link
Member

Choose a reason for hiding this comment

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

I can't see this file in this PR

Comment on lines +39 to +46
/* CAN communication mode */
#define CAN_NORMAL_MODE ((uint8_t)0x00U) /*!< normal communication mode */
#define CAN_LOOPBACK_MODE ((uint8_t)0x01U) /*!< loopback communication mode */
#define CAN_SILENT_MODE ((uint8_t)0x02U) /*!< silent communication mode */
#define CAN_SILENT_LOOPBACK_MODE ((uint8_t)0x03U) /*!< loopback and silent communication mode */

/* CAN timeout */
#define CAN_TIMEOUT ((uint32_t)0x0000FFFFU) /*!< timeout value */
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

@nandojve nandojve left a comment

Choose a reason for hiding this comment

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

Hi @feilongfl .
You need review dt-bindings: add pinctrl gd32c103xx generated headers commit. There is mention to gd32c403xx MCU.

This can only be merged after a board be build at main repository,

@nandojve nandojve added the DNM Do Not Merge label Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DNM Do Not Merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants