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
boards: MikroE Clicker 2: Added board #27345
boards: MikroE Clicker 2: Added board #27345
Conversation
2799edd
to
d6bde65
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, a few minor corrections below.
1ebae7e
to
2ae1db9
Compare
}; | ||
|
||
&adc1 { | ||
status ="okay"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be possible to have labels for the channels here ? I couldn't find (or understand) the documentation of it.
e.g.:
mikrobus_1_adc: adc1_ch2 {
label = "mikroBUS 1 ADC";
channel = <2>;
};
mikrobus_2_adc: adc1_ch3 {
label = "mikroBUS 2 ADC";
channel = <3>;
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not currently possible. We would need something along the line of the gpio-nexus for ADCs in order to support this...
}; | ||
|
||
&adc1 { | ||
status ="okay"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not currently possible. We would need something along the line of the gpio-nexus for ADCs in order to support this...
2ae1db9
to
f10a3d5
Compare
Ok so it seems the problem in the tests is that I use defconfig to get a uart console on the usb interface, but when running the non-multithreaded kernel test POSIX is not defined and then the USB stack cannot be defined. |
f10a3d5
to
5d4a002
Compare
@pbeSmartDevice Sorry, it seems I missed your PR. |
5d4a002
to
e2f8e18
Compare
That's fine |
I meant the pinmux actually. I2C and ADC are on their way too. Cf #28999 for more info. |
e2f8e18
to
c3d67bc
Compare
I tried to update it, but I can't seem to find the right include and I can't figure out how to include something that is not a file in my |
001ca45
to
904421b
Compare
Do you mean this |
Yes that was exactly it, everything seems to be working now. |
904421b
to
4c8dca3
Compare
@erwango So is this sufficient? |
@pbeSmartDevice It seems fine aside from the pinmux part that should be moved to device tree. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please squash 2 first commit.
And it would be good to confirm this is working, otherwise there is not point ...
4c8dca3
to
fac97f2
Compare
I've Added ADC and SPI as well, should I hold out for USB (I can see it doesn't have a PR yet, at least according to #28999) or should I just squash the three board related ones and have it upstreamed? Also could I get feedback about the ADC if this is the correct way to go? |
Looks good indeed.
USB is on its way, but it might take longer to merge. So let's do the squash and we'll try to merge. |
f78ba7c
to
339e020
Compare
So @erwango I could guess that you would want me to update to get me to use the dts for the USB as well, however I haven't been able to get serial port over USB to work with the new patch and I have no idea why. |
You mean that this is working fine if you configure uart4 pins using pinmux.c ? You would be able to compare GPIO (A in your case) register settings after pins have been configured (let's say end of Last point, is there a working branch you can share? |
No, what I mean is that no matter what setting I try out I can't get the hello world sample to work.
Then the /dev/ttyACM0 doesn't show up, when I omit fdb6c46 ( changing pinmux settings to dts settings ) it still doesn't show up and dmesg also doesn't show any new connected devices. |
@pbeTrifork, do you know if there's any life? Is blinky working ? |
Yes, blinky is working, my main project for this is also working, I can read the sensor outputs from my program using gdb, but it still doesn't show up on dmesg or as a serial port, so the output doesn't come out. |
339e020
to
47e05b9
Compare
Merged with master and tried the cdc usb sample, which worked fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two minor changes and we're good to go, if you're ready.
boards/arm/mikroe_clicker_2/pinmux.c
Outdated
* Copyright (c) 2020 Trifork | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
#include <kernel.h> | ||
#include <device.h> | ||
#include <init.h> | ||
#include <drivers/pinmux.h> | ||
#include <sys/sys_io.h> | ||
|
||
#include <pinmux/stm32/pinmux_stm32.h> | ||
|
||
/* Pin assignments for MikroE Clicker 2 board for STM32 */ | ||
static const struct pin_config pinconf[] = { | ||
}; | ||
|
||
static int pinmux_mikroe_clicker_2_init(const struct device *port) | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file could be removed now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I thought I read that the idea was to keep it in, but ok.
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if(CONFIG_PINMUX) | ||
zephyr_library() | ||
zephyr_library_sources(pinmux.c) | ||
endif() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this file
Added support for the Clicker 2 for STM32 board from MikroElektronika Signed-off-by: Paul M. Bendixen <pbe@trifork.com>
Modified the drivers.adc test to include the MikroE Clicker 2 board Signed-off-by: Paul M. Bendixen <pbe@trifork.com>
47e05b9
to
025bca0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Added MikroE Clicker 2 board.
Discussed with @henrikbrixandersen the best way to cope with the two mikrobus ports on the board, didn't get anything conclusive so added as aliases for now
Signed-off-by: Paul M. Bendixen pbe@trifork.com