Mapping of modm #1256
Replies: 1 comment
-
Manually, by copying the relevant data out of the User Manuals.
It was just forgotten during the BSP creation. Please add it in a PR.
The function here contains the generated list of signals that can be connected to. Seems to be correctly generated, should return template<Peripheral p, typename Signal>
static consteval int
signalToChannel()
{
modm::platform::detail::SignalConnection<Signal, p>{};
if constexpr (Signal::Signal == Gpio::Signal::Ch1) {
return 1;
} else if constexpr (Signal::Signal == Gpio::Signal::Ch1n) {
return 1;
} else if constexpr (Signal::Signal == Gpio::Signal::Ch2) {
return 2;
} else if constexpr (Signal::Signal == Gpio::Signal::Ch2n) {
return 2;
} else if constexpr (Signal::Signal == Gpio::Signal::Ch3) {
return 3;
} else if constexpr (Signal::Signal == Gpio::Signal::Ch3n) {
return 3;
} else if constexpr (Signal::Signal == Gpio::Signal::Ch4) {
return 4;
} else {
// assert is always false, static_assert(false) would not compile
static_assert(!sizeof(Signal), "Invalid timer channel");
}
} The generated GPIO data also looks fine: struct DataB1 {
static constexpr Gpio::Port port = Gpio::Port::B;
static constexpr uint8_t pin = 1;
struct Ch3n { using Data = DataB1; static constexpr Gpio::Signal Signal = Gpio::Signal::Ch3n; };}; Not sure what's broken. configureOutputChannel(uint32_t channel, OutputCompareMode mode, Value compareValue, PinState out = PinState::Enable);
Yes, the GPIOs are shared between both connector types. |
Beta Was this translation helpful? Give feedback.
-
Hey guys, can you tell me how you did the mapping of the nucleoF439zi?
I want to generate some Code, therefore i made a map from the nucleoF439zi manual with all GPIO, Timer- and ADC-Functions. My code checks this map and use unused Pins in my main.cpp. But i got 2 Issues during testing:
I also don't really understand the differnece between the CN7-CN10 and CN11/12 connectors. Has a GPIO on both connectors the same functions, or is there some internal wiring, which limits the functions of the GPIO.
I hope you can help me a bit.
Beta Was this translation helpful? Give feedback.
All reactions