-
Notifications
You must be signed in to change notification settings - Fork 3k
add support for the RAK811 #6043
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
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI; | ||
RCC_OscInitStruct.HSEState = RCC_HSE_OFF; | ||
RCC_OscInitStruct.HSIState = RCC_HSI_ON; | ||
// SYSCLK = 32 MHz ((16 MHz * 4) / 2) |
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.
HSI calibration value is missing. Add:
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
|
||
ANT_CTX_PA = PA_4, | ||
ANT_CRX_RX = PB_6, | ||
ANT_CBT_HF = PB_7, |
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.
Is ANT_CBT_HF a lora pin? Instead Lora needs:
RF_TCXO_EN = PH_1,
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 have CBT_HF from : https://github.com/RAKWireless/RAK811_BreakBoard/blob/1d5483aef2c691640db747fb230ceeb96acb378b/src/boards/RAK811BreakBoard/board.h#L96
However I have no idea about what those pins are as I don't know (yet) lora at all.
This is now ok for our lora example application. |
What does need work for this pull request? |
As stated in the Todo list |
Also @jeromecoutant are the modifications to spi_api.c and hal_tick_16b.c ok ? |
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.
Lots of pins are missing in the PeripheralPins.c file ?
@@ -59,7 +59,9 @@ int spi_get_clock_freq(spi_t *obj) { | |||
spi_hz = HAL_RCC_GetPCLK2Freq(); | |||
break; | |||
case SPI_2: | |||
case SPI_3: | |||
#ifdef SPI_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.
There is no SPI_3 in STM32L151CB
@jeromecoutant that's because I only exposed the "usable" peripheral depending on what's actually wired in and out the module. |
When will be these added? Is it travis CI addition, any other? |
Here are the results with the latest mbed-os. Some problems with GCC and ARMCC test_report_armcc.txt |
@ashok-rao Are the PE team now taking responsibility for this port ?? |
@adbridge .. sorry for late reply..this is still in discussion.. Will update as soon as I can. Thanks. |
@ARMmbed/team-st-mcd Could you please check the |
The FLASHSIZE_BASE defined in the stm32l151xb.h file is correct: I have no idea why you have 0x6280 on your platform ? |
@bcostm The only thing I know is that I have a STM32L151CBU6A and that I read with gdb :
because :
|
My device ID is However the HAL only provides a way to read 16bit. And according to the reference manual, the HAL is probably also wrong for the devices where devid=0x436. |
I looked in the stm32l1xx_ll_utils.h file and there is a note in the LL_GetFlashSize function:
So I suppose your device is a 0x429 (last digits). The size is only on the 8 first bits and you read 0x6280 |
I base my research on what STM32Cube has generated but it seems that the @ARMmbed/team-st-mcd How would you fix that issue ? I'll try to backport the difference between |
@bcostm Indeed, also |
The update of the STM32L1 HAL driver in mbed is in our plan. We should do it in the coming weeks. |
"Fixing" this issue raised another one in multithreaded access to the NVStore. test_report_armc6.txt |
Build : FAILUREBuild number : 1585 |
@cmonr What kind of failure is that ? |
That is a completely new type of CI failure. Don't think it's PR related. |
From logs looks like support for IAR toolchian is missing
|
@ithinuel Looks like I spoke too soon. The build job failed before actually building anything. The CI expects GCC_ARM, ARM, and IAR to be all supported toolchains. |
@cmonr @studavekar a lot of platform does not support all 3, non-exhaustive list :
|
Doesn't look like it shows up in the supported list. Or am I missing something?
|
https://www.mbed.com/en/about-mbed/mbed-enabled/mbed-enabled-program-requirements/ .. all 3 toolchains MUST be supported for Mbed Enabled.. |
@ashok-rao Thank you, i'll add IAR then. @studavekar they are in |
/morph build |
Build : SUCCESSBuild number : 1603 Triggering tests/morph test |
Exporter Build : FAILUREBuild number : 1235 |
Test : FAILUREBuild number : 1389 |
Just a note concerning:
Only the GCC_ARM compiler is supported on this board because this board is not mbed enabled (you can see that the "release_versions" property in targets.json is not present). This explains why. |
@bcostm Thanks ! I still have things to learn about |
/morph build |
Build : SUCCESSBuild number : 1622 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1251 |
Test : SUCCESSBuild number : 1404 |
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
{ | ||
if (SetSysClock_PLL_HSI() == 0) { | ||
while(1) { | ||
// [TODO] Put something here to tell the user that a problem occured... |
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 look forward to the day where this line is replaced on the other STM devices along with this.
Description
This adds support for the lora module RAK811.
This has been tested with our beloved blinky flashed with openocd.
Todo