Skip to content

Add support RAK811 #229

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

Closed
wants to merge 14 commits into from
Closed

Add support RAK811 #229

wants to merge 14 commits into from

Conversation

sabas1080
Copy link
Contributor

@sabas1080 sabas1080 commented Mar 16, 2018

Hi

I am trying to add the board RAK811, I am new to this and I have followed this tutorial

https://github.com/stm32duino/wiki/wiki/Add-a-new-variant-(board)

RAK811 info:

"core": "stm32",
"cpu": "cortex-m3",
"extra_flags": "-DSTM32L151xB -DSTM32L151CBx",
"mcu": "stm32l151cbx",
"variant": "stm32l151xba",

"url": "http://www.rakwireless.com/en/download/RAK811/Hardware%20Design",
"vendor": "RAK"

stm32flash /dev/ttyUSB0
stm32flash 0.5
http://stm32flash.sourceforge.net/

Interface serial_posix: 57600 8E1
Version : 0x31
Option 1 : 0x00
Option 2 : 0x00
Device ID : 0x0429 (STM32L1xxx6(8/B)A)

RAM : 16KiB
Flash : 128KiB (size first sector: 16x256)

Here is source,
https://github.com/RAKWireless/RAK811_BreakBoard

Datasheet:
http://wiki.rakwireless.com/lib/exe/fetch.php?media=rak811_lora_module_datasheet_v1.3.pdf

Examples of boards:
https://www.aliexpress.com/store/product/RAK811-LoRa-Tracker-Board-MAX-7Q-GPS-Module-and-MEMS-Sensor-Wireless-Remote-Positioning-Solution-LoRaWAN/2805180_32844470946.html?spm=2114.12010608.0.0.219c103eDASa9w

Thanks
#219
rogerclarkmelbourne/Arduino_STM32#442

@fpistm
Copy link
Member

fpistm commented Mar 16, 2018

Hi @sabas1080 ,
FLASH_BANK1_END is defined by the CMSIS device file.
For this version stm32l151xb it is not defined as few flash size.

So in stm32_eeprom.c, it require to handle this case:

Probably like this

#ifdef FLASH_BANK2_END
#define FLASH_BASE_ADDRESS  ((uint32_t)((FLASH_BANK2_END + 1) - FLASH_PAGE_SIZE))
#elif defined(FLASH_BANK1_END)
#define FLASH_BASE_ADDRESS  ((uint32_t)((FLASH_BANK1_END + 1) - FLASH_PAGE_SIZE))
#else
#define FLASH_BASE_ADDRESS  ((uint32_t)((FLASH_END + 1) - FLASH_PAGE_SIZE))
#endif // FLASH_BANK2_END

@sabas1080
Copy link
Contributor Author

Thanks, compiled blink!

captura de pantalla 2018-03-16 a la s 13 30 28

I just need the test

@sabas1080
Copy link
Contributor Author

Work ok blink, define led_built ok, Serial ok

@fpistm
Copy link
Member

fpistm commented Mar 17, 2018

It seems you used an old version of the core to test.
For better Arduino compatibility, some pins definitions have changed.
See https://github.com/stm32duino/Arduino_Core_STM32/blob/master/variants/board_template/variant.h
ex: Analog pins is no more an enum.

RAK is not a Nucleo 64. It hink you could add a "RAK" menu and then the RAK 811
I will have a look deeply next week.

@fpistm
Copy link
Member

fpistm commented May 20, 2018

This PR should be replaced by this one: #254

@fpistm fpistm added waiting feedback Further information is required review on going labels May 20, 2018
@fpistm fpistm removed the waiting feedback Further information is required label Oct 1, 2018
@fpistm
Copy link
Member

fpistm commented Oct 1, 2018

#254 merged.
Close this one.

@fpistm fpistm closed this Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new variant Add support of new bard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants