Ver Fonte

更新MCU工程
1.修复NVIC结构体访问越界问题
2.修改DWSPI配置rx_sample_delay的最小时钟
更新CPU工程
1.修复ecspi驱动ecspi_xfer接口内部判断逻辑错误问题

helen há 1 semana atrás
pai
commit
3e8a273d09

+ 1 - 1
amt630hv160-freertos-beta/ArkmicroFiles/libcpu-amt630hv160/source/ecspi.c

@@ -858,7 +858,7 @@ static int ecspi_xfer(struct spi_slave *slave, struct spi_message *message)
 	ret = ark_spi_pio_xfer(aspi, message);
 	ret = ark_spi_pio_xfer(aspi, message);
 end:
 end:
 #ifndef SPI1_SLAVE_MODE
 #ifndef SPI1_SLAVE_MODE
-	if (message->cs_release || ret)
+	if (message->cs_release || (ret != message->length))
 		ark_spi_chipselect(aspi, 0);
 		ark_spi_chipselect(aspi, 0);
 #endif
 #endif
 
 

+ 11 - 11
amt630hv160-mcu/amt630hv160-mcu-iram/src/ArkmicroFiles/libcpu-amt630hv160/include/amt630hv160_map.h

@@ -29,17 +29,17 @@
 /*------------------------ Nested Vectored Interrupt Controller --------------*/
 /*------------------------ Nested Vectored Interrupt Controller --------------*/
 typedef struct
 typedef struct
 {
 {
-	vu32 Enable[2];
-	u32 RESERVED0[30];
-	vu32 Disable[2];
-	u32 RSERVED1[30];
-	vu32 Set[2];
-	u32 RESERVED2[30];
-	vu32 Clear[2];
-	u32 RESERVED3[30];
-	vu32 Active[2];
-	u32 RESERVED4[62];
-	vu32 Priority[11];
+	vu32 Enable[8];
+	u32 RESERVED0[24];
+	vu32 Disable[8];
+	u32 RSERVED1[24];
+	vu32 Set[8];
+	u32 RESERVED2[24];
+	vu32 Clear[8];
+	u32 RESERVED3[24];
+	vu32 Active[8];
+	u32 RESERVED4[56];
+	vu32 Priority[60];
 } NVIC_TypeDef;
 } NVIC_TypeDef;
 
 
 typedef struct
 typedef struct

+ 2 - 2
amt630hv160-mcu/amt630hv160-mcu-iram/src/ArkmicroFiles/libcpu-amt630hv160/source/amt630hv160_spi.c

@@ -559,7 +559,7 @@ static int dw_spi_transfer_one(SPISlave *slave, SPIMessage *message)
 
 
 	if (dws->current_freq >= 63500000)
 	if (dws->current_freq >= 63500000)
 		dws->regs->RX_SAMPLE_DLY = 2;
 		dws->regs->RX_SAMPLE_DLY = 2;
-	else if (dws->current_freq >= 50000000)
+	else if (dws->current_freq >= 47000000)
 		dws->regs->RX_SAMPLE_DLY = 1;
 		dws->regs->RX_SAMPLE_DLY = 1;
 
 
 	if (message->cs_take)
 	if (message->cs_take)
@@ -742,7 +742,7 @@ xfer_continue:
 
 
 	if (dws->current_freq >= 63500000)
 	if (dws->current_freq >= 63500000)
 		dws->regs->RX_SAMPLE_DLY = 2;
 		dws->regs->RX_SAMPLE_DLY = 2;
-	else if (dws->current_freq >= 50000000)
+	else if (dws->current_freq >= 47000000)
 		dws->regs->RX_SAMPLE_DLY = 1;
 		dws->regs->RX_SAMPLE_DLY = 1;
 
 
 	if (message->cs_take)
 	if (message->cs_take)

+ 11 - 11
amt630hv160-mcu/amt630hv160-mcu-sram-nos/src/ArkmicroFiles/libcpu-amt630hv160/include/amt630hv160_map.h

@@ -29,17 +29,17 @@
 /*------------------------ Nested Vectored Interrupt Controller --------------*/
 /*------------------------ Nested Vectored Interrupt Controller --------------*/
 typedef struct
 typedef struct
 {
 {
-	vu32 Enable[2];
-	u32 RESERVED0[30];
-	vu32 Disable[2];
-	u32 RSERVED1[30];
-	vu32 Set[2];
-	u32 RESERVED2[30];
-	vu32 Clear[2];
-	u32 RESERVED3[30];
-	vu32 Active[2];
-	u32 RESERVED4[62];
-	vu32 Priority[11];
+	vu32 Enable[8];
+	u32 RESERVED0[24];
+	vu32 Disable[8];
+	u32 RSERVED1[24];
+	vu32 Set[8];
+	u32 RESERVED2[24];
+	vu32 Clear[8];
+	u32 RESERVED3[24];
+	vu32 Active[8];
+	u32 RESERVED4[56];
+	vu32 Priority[60];
 } NVIC_TypeDef;
 } NVIC_TypeDef;
 
 
 typedef struct
 typedef struct

+ 2 - 2
amt630hv160-mcu/amt630hv160-mcu-sram-nos/src/ArkmicroFiles/libcpu-amt630hv160/source/amt630hv160_spi.c

@@ -559,7 +559,7 @@ static int dw_spi_transfer_one(SPISlave *slave, SPIMessage *message)
 
 
 	if (dws->current_freq >= 63500000)
 	if (dws->current_freq >= 63500000)
 		dws->regs->RX_SAMPLE_DLY = 2;
 		dws->regs->RX_SAMPLE_DLY = 2;
-	else if (dws->current_freq >= 50000000)
+	else if (dws->current_freq >= 47000000)
 		dws->regs->RX_SAMPLE_DLY = 1;
 		dws->regs->RX_SAMPLE_DLY = 1;
 
 
 	if (message->cs_take)
 	if (message->cs_take)
@@ -742,7 +742,7 @@ xfer_continue:
 
 
 	if (dws->current_freq >= 63500000)
 	if (dws->current_freq >= 63500000)
 		dws->regs->RX_SAMPLE_DLY = 2;
 		dws->regs->RX_SAMPLE_DLY = 2;
-	else if (dws->current_freq >= 50000000)
+	else if (dws->current_freq >= 47000000)
 		dws->regs->RX_SAMPLE_DLY = 1;
 		dws->regs->RX_SAMPLE_DLY = 1;
 
 
 	if (message->cs_take)
 	if (message->cs_take)