-
Notifications
You must be signed in to change notification settings - Fork 1k
Discovery L072CZ-LRWAN1 support #151
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
Conversation
Pins A1/A3/A4/A5 are no connect by default, but could be used by closing solder bridges.
The LED_BUILTIN on Arduino pin D13 is LD2, and it is green, not red as the user manual says. Also add LED_LD[1234] defines to match the markings on the PCB.
Thanks @knielsen |
@knielsen Looks great thanks for the PR ! Any plan on your side to add a LORA library for this board ? |
Sorry, no plans for a LoRa library from me currently... |
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.
Thanks for this variant.
I've make a new PR with all fixes and some cosmetic update (squash, indentation,...) here: #156
# DISCO-L072CZ-LRWAN1 board | ||
# Support: Serial1 (USART1 on PA10, PA9) and Serial=Serial2 (connected to ST-LINK) | ||
Disco.menu.pnum.DISCO_L072CZ_LRWAN1=Discovery L072CZ-LRWAN1 | ||
Disco.menu.pnum.DISCO_L072CZ_LRWAN1.node=NODE_L072CZ |
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.
I've added DIS_L072Z as a possible node value.
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
// {PB_4, TIM22, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM22, 1, 0)}, // TIM22_CH1 - Not available on board | ||
// {PB_4, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1 - Not available on board | ||
// {PB_5, TIM22, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM22, 2, 0)}, // TIM22_CH2 | ||
{PB_5, TIM3, STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF4_TIM3, 2, 0)}, // TIM3_CH2 |
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.
Seems TIM3 on this pin do not work. I've tried TIM22 it is ok.
I've debugged but see nothing wrong. I've tried TIM3 with the Servo and it is ok.
I saw in errata sheet an issue with TIM3_ER on other pin but not on this one.
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.
Interesting, thanks for testing this.
TIM22 is TIMER_TONE in variant.h, but not sure that will necessarily be a problem.
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.
Not a pb. 😉
An third analog/ADC input is available as A6 on the PA5 pin. | ||
|
||
SPI MOSI and MISO are available on digital pins D11 and D12, but the | ||
SCK pin is D3 (unlike Arduino Uno where it is on D13). |
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.
By default SB2 is closed so D13 is connected to PB13 like D3. So SCK is also on D13.
I've tested SPI and it is ok with D13
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, good that you found this from test. The user manual said SB2 is OFF by default.
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.
Yes user manual has some errors. I will raise issue internally to correct those one
PB_6, //D10 | ||
PB_15, //D11 | ||
PB_14, //D12 | ||
PA_5, //D13 |
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.
D13 is PB13
PB6, //D10 | ||
PB15, //D11 | ||
PB14, //D12 | ||
PA5, //D13 |
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.
D13 is PB13
#define SS3 8 | ||
#define MOSI 11 | ||
#define MISO 12 | ||
#define SCK 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.
As D13 is equal to D3 I've revert to 13
//Timer Definitions | ||
//Do not use timer used by PWM pins when possible. See PinMap_PWM. | ||
#define TIMER_TONE TIM22 | ||
#define TIMER_UART_EMULATED TIM21 |
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.
I removed the TIMER_UART_EMULATED as it need to be reviewed. (move as SoftwareSerial library)
No problem, this is good to know anyway to avoid any parallel developments - thanks again for your contribution. |
Looks great @fpistm , thanks! |
This PR has been merged thanks #156 |
This pull request adds support for the Discovery L072CZ-LRWAN1 board:
http://www.st.com/en/evaluation-tools/b-l072z-lrwan1.html