Skip to content

Commit c035953

Browse files
Start testing STM32U0 with test shield, make a few fixes
1 parent d53849f commit c035953

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

targets/TARGET_STM/TARGET_STM32U0/stm_dma_info.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626

2727
/// Mapping from SPI index to DMA link info for Tx
2828
static const DMALinkInfo SPITxDMALinks[] = {
29-
{1, 0, DMA_REQUEST_SPI1_TX},
30-
{1, 2, DMA_REQUEST_SPI2_TX},
29+
{1, 2, DMA_REQUEST_SPI1_TX},
30+
{1, 4, DMA_REQUEST_SPI2_TX},
3131
#if defined (SPI3)
32-
{1, 4, DMA_REQUEST_SPI3_TX}
32+
{1, 6, DMA_REQUEST_SPI3_TX}
3333
#endif
3434
};
3535

targets/TARGET_STM/i2c_api.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1120,11 +1120,11 @@ int i2c_byte_read(i2c_t *obj, int last)
11201120
if (last) {
11211121
/* Disable Address Acknowledge */
11221122
tmpreg = tmpreg & (~I2C_CR2_RELOAD);
1123-
tmpreg |= I2C_CR2_NACK | (I2C_CR2_NBYTES & (1 << 16));
1123+
tmpreg |= I2C_CR2_NACK | (1 << I2C_CR2_NBYTES_Pos);
11241124
} else {
11251125
/* Enable reload mode as we don't know how many bytes will be sent */
11261126
/* and set transfer size to 1 */
1127-
tmpreg |= I2C_CR2_RELOAD | (I2C_CR2_NBYTES & (1 << 16));
1127+
tmpreg |= I2C_CR2_RELOAD | (1 << I2C_CR2_NBYTES_Pos);
11281128
}
11291129

11301130
/* Set the prepared configuration */

targets/targets.json5

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4803,10 +4803,6 @@ mode is recommended for target MCUs with small amounts of flash and RAM.",
48034803
"TRNG",
48044804
//"USBDEVICE" // TODO
48054805
],
4806-
"device_has_remove": [
4807-
"I2C", // Not tested just prepared
4808-
"I2CSLAVE" // Not tested just prepared
4809-
],
48104806
"is_mcu_family_target": true
48114807
},
48124808
"MCU_STM32U083xC": {

0 commit comments

Comments
 (0)