Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1ae377b

Browse files
authored
Merge pull request#97 from fprwi6labs/DISCO_L475VG_IOT
New board Discovery L475VG IOT
2 parentse70c63b +8a5dce8 commit1ae377b

File tree

15 files changed

+2526
-2
lines changed

15 files changed

+2526
-2
lines changed

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#Arduino core support for STM32 based boards
1+
#Arduino core support for STM32 based boards
22
###Latest release[![GitHub release](https://img.shields.io/github/release/stm32duino/Arduino_Core_STM32.svg)](https://github.com/stm32duino/Arduino_Core_STM32/releases/latest)
33
[![GitHub commits](https://img.shields.io/github/commits-since/stm32duino/Arduino_Core_STM32/2017.8.31.svg)](https://github.com/stm32duino/Arduino_Core_STM32/compare/2017.8.31...master)
44

@@ -8,7 +8,7 @@
88

99
##Getting Started
1010

11-
This repo is available as a package usable with[Arduino Boards Manager](https://www.arduino.cc/en/guide/cores).
11+
This repo is available as a package usable with[Arduino Boards Manager](https://www.arduino.cc/en/guide/cores).
1212

1313
For full instructions on using the "**Boards Manager**", see the[Getting Started](https://github.com/stm32duino/wiki/wiki/Getting-Started) page.
1414

@@ -50,6 +50,7 @@ For advanced user, you can use the repository: see the [Using git repository](ht
5050
* STM32L4
5151
*[Nucleo L432KC](http://www.st.com/en/evaluation-tools/nucleo-l432kc.html)
5252
*[Nucleo L476RG](http://www.st.com/en/evaluation-tools/nucleo-l476rg.html)
53+
*[B-L475E-IOT01A](http://www.st.com/en/evaluation-tools/b-l475e-iot01a.html)
5354

5455
##Troubleshooting
5556

‎boards.txt‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,20 @@ Disco.menu.board_part_num.DISCO_F746NG.build.product_line=STM32F746xx
301301
Disco.menu.board_part_num.DISCO_F746NG.build.variant=DISCO_F746NG
302302
Disco.menu.board_part_num.DISCO_F746NG.build.cmsis_lib_gcc=arm_cortexM7l_math
303303

304+
# DISCO_L475VG_IOT board
305+
# Support: USB HID, Serial1 (USART1 on PA1, PA0)
306+
Disco.menu.board_part_num.DISCO_L475VG_IOT=STM32L475VG-DISCOVERY-IOT
307+
Disco.menu.board_part_num.DISCO_L475VG_IOT.node=DIS_L4IOT
308+
Disco.menu.board_part_num.DISCO_L475VG_IOT.upload.maximum_size=1048576
309+
Disco.menu.board_part_num.DISCO_L475VG_IOT.upload.maximum_data_size=98304
310+
Disco.menu.board_part_num.DISCO_L475VG_IOT.build.mcu=cortex-m4
311+
Disco.menu.board_part_num.DISCO_L475VG_IOT.build.f_cpu=80000000L
312+
Disco.menu.board_part_num.DISCO_L475VG_IOT.build.board=DISCO_L475VG_IOT
313+
Disco.menu.board_part_num.DISCO_L475VG_IOT.build.series=STM32L4xx
314+
Disco.menu.board_part_num.DISCO_L475VG_IOT.build.product_line=STM32L475xx
315+
Disco.menu.board_part_num.DISCO_L475VG_IOT.build.variant=DISCO_L475VG_IOT
316+
Disco.menu.board_part_num.DISCO_L475VG_IOT.build.cmsis_lib_gcc=arm_cortexM4l_math
317+
304318
# Upload menu
305319
Disco.menu.upload_method.MassStorageMethod=Mass Storage
306320
Disco.menu.upload_method.MassStorageMethod.upload.protocol=

‎cores/arduino/stm32/PeripheralPins.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,8 @@ extern const PinMap PinMap_CAN_TD[];
6868
//*** ETHERNET ***
6969
externconstPinMapPinMap_Ethernet[];
7070

71+
//*** QUADSPI ***
72+
externconstPinMapPinMap_QUADSPI[];
73+
7174
#endif
7275

‎cores/arduino/stm32/usbd_hid_composite.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,7 @@ __ALIGN_BEGIN static uint8_t HID_KEYBOARD_ReportDesc[HID_KEYBOARD_REPORT_DESC_SI
369369
staticuint8_tUSBD_HID_Init (USBD_HandleTypeDef*pdev,
370370
uint8_tcfgidx)
371371
{
372+
UNUSED(cfgidx);
372373
uint8_tret=0;
373374

374375
/* Open EP IN */
@@ -407,6 +408,7 @@ static uint8_t USBD_HID_Init (USBD_HandleTypeDef *pdev,
407408
staticuint8_tUSBD_HID_DeInit (USBD_HandleTypeDef*pdev,
408409
uint8_tcfgidx)
409410
{
411+
UNUSED(cfgidx);
410412
/* Close HID EPs */
411413
USBD_LL_CloseEP(pdev,
412414
HID_MOUSE_EPIN_ADDR);

‎libraries/SPI/src/SPI.cpp‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,31 @@ void SPIClass::transfer(uint8_t _pin, void *_buf, size_t _count, SPITransferMode
318318
digitalWrite(_pin, HIGH);
319319
}
320320

321+
voidSPIClass::transfer(byte _pin,void *_bufout,void *_bufin,size_t _count, SPITransferMode _mode)
322+
{
323+
if ((_count ==0) || (_bufout ==NULL) || (_bufin ==NULL) || (_pin > NUM_DIGITAL_PINS))
324+
return;
325+
326+
if(_pin != _CSpin) {
327+
uint8_t idx =pinIdx(_pin, GET_IDX);
328+
if(idx == NB_SPI_SETTINGS) {
329+
return;
330+
}
331+
spi_init(&_spi, spiSettings[idx].clk,
332+
spiSettings[idx].dMode,
333+
spiSettings[idx].msb);
334+
_CSpin = _pin;
335+
}
336+
337+
if((_pin != CS_PIN_CONTROLLED_BY_USER) && (_spi.pin_ssel == NC))
338+
digitalWrite(_pin, LOW);
339+
340+
spi_transfer(&_spi, ((uint8_t*)_bufout), ((uint8_t*)_bufin), _count, SPI_TRANSFER_TIMEOUT);
341+
342+
if((_pin != CS_PIN_CONTROLLED_BY_USER) && (_mode == SPI_LAST) && (_spi.pin_ssel == NC))
343+
digitalWrite(_pin, HIGH);
344+
}
345+
321346
voidSPIClass::attachInterrupt(void) {
322347
// Should be enableInterrupt()
323348
}

‎libraries/SPI/src/SPI.h‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ class SPIClass {
114114
bytetransfer(uint8_t pin,uint8_t _data, SPITransferMode _mode = SPI_LAST);
115115
uint16_ttransfer16(uint8_t pin,uint16_t _data, SPITransferMode _mode = SPI_LAST);
116116
voidtransfer(uint8_t pin,void *_buf,size_t _count, SPITransferMode _mode = SPI_LAST);
117+
voidtransfer(byte _pin,void *_bufout,void *_bufin,size_t _count, SPITransferMode _mode = SPI_LAST);
117118

118119
// Transfer functions when user controls himself the CS pin.
119120
bytetransfer(uint8_t _data, SPITransferMode _mode = SPI_LAST)
@@ -131,6 +132,11 @@ class SPIClass {
131132
transfer(CS_PIN_CONTROLLED_BY_USER, _buf, _count, _mode);
132133
}
133134

135+
voidtransfer(void *_bufout,void *_bufin,size_t _count, SPITransferMode _mode = SPI_LAST)
136+
{
137+
transfer(CS_PIN_CONTROLLED_BY_USER, _bufout, _bufin, _count, _mode);
138+
}
139+
134140
// Transaction Functions
135141
voidusingInterrupt(uint8_t interruptNumber);
136142

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp