Comments (13)
I see.
I think we then can we conclude the the definitions are okay for Serial and Wire because they're really the only pin choices for USART0 and I2C0? Users can still use Serial
, Serial1
, Wire
, Wire1
as needed to mix-match. Connecting the pins to different devices or headers is a hardware problem and can't be solved in this Arduino core.
from arduinocore-gd32.
F330F8 does exist as a variant here and is referenced in the boards.txt
.
Lines 338 to 341 in dfa7ccb
Are you sure you're using https://raw.githubusercontent.com/CommunityGD32Cores/GD32Core-New/main/package_gd32_index.json
as the package URL? If you have an older version of tis core previously installed, you need to uninstall + reinstall it in the Arduino IDE boards manager.
from arduinocore-gd32.
SERIAL0_RX == PIN_WIRE_SDA shouldn't have happened. The problem is that all of these variant.h files are autogenerated by a script, gd32_genpinmap, and this script doesn't have a very sophisticated "pin allocator" to make sure there isn't a double-usage of a pin in two popular peripherals. It just has a "prefered" pin, and if that pin doesn't exist, it goes to the next preferred pin.
As a result of that, definitions like that can happen.
You're free to change the pins to whatever you want -- in limits with the peripheral, of course.
For I2C
ArduinoCore-GD32/variants/GD32F330F8_GENERIC/PeripheralPins.c
Lines 114 to 126 in 2cb8305
For UART
ArduinoCore-GD32/variants/GD32F330F8_GENERIC/PeripheralPins.c
Lines 152 to 165 in 2cb8305
from arduinocore-gd32.
Hah, I actually have to correct myself here. According to that, the only possibility for "Wire", mapping to I2C0
, really is PA9, PA10. Same as for USART0!
So, in the application, don't use Serial
and Wire
at the same time -- but you can use e.g. Serial
and Wire1
, or Serial1
and Wire
, since they're on different pins (mix+match of USART0, USART1, I2C0, I2C1).
Unfortunately I think if you design the hardware with a I2C device on the I2C0 pins (same as USART0 pins), then uploading firmware in the BOOT0 mode will fail, the I2C devices will react to edges of the UART RX and TX signal and screw with the signal, trying to pull it LOW various times.
from arduinocore-gd32.
From what I have seen, the same goes for most TSSOP20 chips.
I2C needs a pull-up. Yes, I see the problem. Maybe separate the I2C lines with a jumper? This way I can upload a sketch, then solder the I2C jumper and connect the lines...
from arduinocore-gd32.
I think you can use a double-throw, double-pole switch where, if the switch is UP, then PA9, PA10 lines are connected to the I2C devices, and if DOWN, they are disconnected (or connected to some UART pin headers). That way it's atleast easily switchable.
from arduinocore-gd32.
Space is the problem. Three-pad solder joint will do the same job. The same one I use as a BOOT selector. Besides, I shouldn't leave an option for a user to mess it up. :)
from arduinocore-gd32.
Heh,
On GitHub, there is a support for this chip. It clearly says in variants.
But, in Arduino IDE, there is none. Version I have installed is 0.0.1
How to add support for this one chip?
from arduinocore-gd32.
from arduinocore-gd32.
1.8.19
from arduinocore-gd32.
LOL.
This did the trick. I just reinstalled it. I still get the 0.0.1 version, but this time with all the boards in the list.
Thank you.
from arduinocore-gd32.
We don't version the core yet, so it's been "0.0.1" forever -- a reinstall however will always install the latest version this git repository.
from arduinocore-gd32.
I believe it should have versions. I didn't get the update option to a newer version, so I didn't know what to do. I thought I have the newest version, and thought it was some kind of a bug.
Thank you anyway, and thank you for your effort.
from arduinocore-gd32.
Related Issues (20)
- freeRTOS for arduino support HOT 1
- Restore F170, F190 compilation
- DAC buffer on/off HOT 6
- EXTI GPIO: cannot assign callback to same pin number on different ports (GD32F130) HOT 2
- GD32F130 GPIO EXTI4-15 interrupt handler is slow, would be nice to be able to override it HOT 2
- Internal ADC Channel sampling HOT 2
- GD32F4XX SUPPORT HOT 1
- gpio_interrupt.c bug HOT 2
- Is there any arduino update for the GD32E23x board now? HOT 15
- Keep a structure similar to Arduino_Core_STM32 HOT 3
- GPIO mode mappings are wrong. Never get remapped to the SPL definitions. Needs rework HOT 3
- Move HardwareSerial to use Arduino HardwareSerial API HOT 1
- Keil Convert Arduino
- GD_PORT_GET(X) and GD_PIN_GET(X) encoding error HOT 1
- error: 'ltoa' was not declared in this scope; did you mean 'utoa'? HOT 1
- SimpleFOC HOT 10
- I2C on PB10 and PB11 HOT 6
- GD32F130xxxx clock support HOT 18
- I2C_slave hangs because of tx_buffer_ptr is never set back and *tx_buffer_ptr gets out of bounds.. HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinocore-gd32.