• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

テスト用のあれこれ共用フォルダ


Commit MetaInfo

Revisiona6b5e43ece6a2630c54a55b32257f2f4f4e11bee (tree)
Zeit2018-04-30 23:40:15
Autortakemasa <suikan@user...>
Commitertakemasa

Log Message

Test for the SPI master.

Ändern Zusammenfassung

Diff

--- a/stm32_development/murasaki/Inc/stm32f7xx_it.h
+++ b/stm32_development/murasaki/Inc/stm32f7xx_it.h
@@ -51,6 +51,7 @@ void SysTick_Handler(void);
5151 void DMA1_Stream1_IRQHandler(void);
5252 void DMA1_Stream3_IRQHandler(void);
5353 void EXTI9_5_IRQHandler(void);
54+void SPI1_IRQHandler(void);
5455 void USART3_IRQHandler(void);
5556 void EXTI15_10_IRQHandler(void);
5657 void TIM8_TRG_COM_TIM14_IRQHandler(void);
--- a/stm32_development/murasaki/Src/main.c
+++ b/stm32_development/murasaki/Src/main.c
@@ -184,29 +184,41 @@ void SystemClock_Config(void)
184184 */
185185 __HAL_RCC_PWR_CLK_ENABLE();
186186
187- __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3);
187+ __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE1);
188188
189189 /**Initializes the CPU, AHB and APB busses clocks
190190 */
191191 RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
192192 RCC_OscInitStruct.HSIState = RCC_HSI_ON;
193193 RCC_OscInitStruct.HSICalibrationValue = 16;
194- RCC_OscInitStruct.PLL.PLLState = RCC_PLL_NONE;
194+ RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
195+ RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
196+ RCC_OscInitStruct.PLL.PLLM = 8;
197+ RCC_OscInitStruct.PLL.PLLN = 216;
198+ RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
199+ RCC_OscInitStruct.PLL.PLLQ = 2;
195200 if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
196201 {
197202 _Error_Handler(__FILE__, __LINE__);
198203 }
199204
205+ /**Activate the Over-Drive mode
206+ */
207+ if (HAL_PWREx_EnableOverDrive() != HAL_OK)
208+ {
209+ _Error_Handler(__FILE__, __LINE__);
210+ }
211+
200212 /**Initializes the CPU, AHB and APB busses clocks
201213 */
202214 RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
203215 |RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
204- RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
216+ RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
205217 RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
206- RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
207- RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
218+ RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV4;
219+ RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV4;
208220
209- if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_0) != HAL_OK)
221+ if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_7) != HAL_OK)
210222 {
211223 _Error_Handler(__FILE__, __LINE__);
212224 }
@@ -238,17 +250,17 @@ static void MX_SPI1_Init(void)
238250 hspi1.Instance = SPI1;
239251 hspi1.Init.Mode = SPI_MODE_MASTER;
240252 hspi1.Init.Direction = SPI_DIRECTION_2LINES;
241- hspi1.Init.DataSize = SPI_DATASIZE_4BIT;
253+ hspi1.Init.DataSize = SPI_DATASIZE_8BIT;
242254 hspi1.Init.CLKPolarity = SPI_POLARITY_LOW;
243255 hspi1.Init.CLKPhase = SPI_PHASE_1EDGE;
244256 hspi1.Init.NSS = SPI_NSS_SOFT;
245- hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_2;
257+ hspi1.Init.BaudRatePrescaler = SPI_BAUDRATEPRESCALER_256;
246258 hspi1.Init.FirstBit = SPI_FIRSTBIT_MSB;
247259 hspi1.Init.TIMode = SPI_TIMODE_DISABLE;
248260 hspi1.Init.CRCCalculation = SPI_CRCCALCULATION_DISABLE;
249261 hspi1.Init.CRCPolynomial = 7;
250262 hspi1.Init.CRCLength = SPI_CRC_LENGTH_DATASIZE;
251- hspi1.Init.NSSPMode = SPI_NSS_PULSE_ENABLE;
263+ hspi1.Init.NSSPMode = SPI_NSS_PULSE_DISABLE;
252264 if (HAL_SPI_Init(&hspi1) != HAL_OK)
253265 {
254266 _Error_Handler(__FILE__, __LINE__);
--- a/stm32_development/murasaki/Src/my_test.cpp
+++ b/stm32_development/murasaki/Src/my_test.cpp
@@ -44,48 +44,37 @@ void InitTestUart(UART_HandleTypeDef * uart_handle, SPI_HandleTypeDef * spi_hand
4444 murasaki::platform.logger = new murasaki::UartLogger(murasaki::platform.uart_console);
4545
4646 // Setting SPI slave devices.
47- murasaki::platform.slave_1 = new murasaki::SpiSlaveSpecifier(murasaki::kspoFallThenRise,
48- murasaki::ksphLatchThenShift,
49- SPI_CS1_GPIO_Port,
50- SPI_CS1_Pin);
51- murasaki::platform.slave_1 = new murasaki::SpiSlaveSpecifier(murasaki::kspoFallThenRise,
52- murasaki::ksphShiftThenLatch,
53- SPI_CS2_GPIO_Port,
54- SPI_CS2_Pin);
55- murasaki::platform.slave_1 = new murasaki::SpiSlaveSpecifier(murasaki::kspoRiseThenFall,
56- murasaki::ksphLatchThenShift,
57- SPI_CS3_GPIO_Port,
58- SPI_CS3_Pin);
59- murasaki::platform.slave_1 = new murasaki::SpiSlaveSpecifier(murasaki::kspoRiseThenFall,
60- murasaki::ksphShiftThenLatch,
61- SPI_CS4_GPIO_Port,
62- SPI_CS4_Pin);
47+ murasaki::platform.slave_1 = new murasaki::SpiSlaveSpecifier(
48+ murasaki::kspoFallThenRise,
49+ murasaki::ksphLatchThenShift,
50+ SPI_CS4_GPIO_Port,
51+ SPI_CS4_Pin);
52+
53+ murasaki::platform.slave_2 = new murasaki::SpiSlaveSpecifier(
54+ murasaki::kspoFallThenRise,
55+ murasaki::ksphShiftThenLatch,
56+ SPI_CS4_GPIO_Port,
57+ SPI_CS4_Pin);
58+
59+ murasaki::platform.slave_3 = new murasaki::SpiSlaveSpecifier(
60+ murasaki::kspoRiseThenFall,
61+ murasaki::ksphLatchThenShift,
62+ SPI_CS4_GPIO_Port,
63+ SPI_CS4_Pin);
64+
65+ murasaki::platform.slave_4 = new murasaki::SpiSlaveSpecifier(
66+ murasaki::kspoRiseThenFall,
67+ murasaki::ksphShiftThenLatch,
68+ SPI_CS4_GPIO_Port,
69+ SPI_CS4_Pin);
70+
6371 // Setting SPI master
6472 murasaki::platform.spi_master = new murasaki::SpiMaster(spi_handle);
6573
6674 // Setting debugger
6775 murasaki::debugger = new murasaki::Debugger(murasaki::platform.logger);
6876 murasaki::debugger->AutoRePrint(); // type any key to show history.
69-#if 0
70- test_fifo = new murasaki::DebuggerFifo(32);
71- MURASAKI_ASSERT(test_fifo != nullptr);
72-
73- helpers.logger = murasaki::platform.logger;
74- helpers.fifo = test_fifo;
75-
76- tx_task = new murasaki::DebuggerTxTask("Debug_tx", //
77- PLATFORM_CONFIG_DEBUG_TASK_STACK_SIZE, //
78- PLATFORM_CONFIG_DEBUG_TASK_PRIORITY, // the bigger value is the higer priority
79- &helpers);
80- MURASAKI_ASSERT(tx_task != nullptr);
8177
82- tx_task->Start();
83-
84- unsigned int copied = test_fifo->Put(reinterpret_cast<const uint8_t *>(MSG1), sizeof(MSG1));
85- test_fifo->NotifyData();
86-
87- murasaki::debugger->Printf("FIFO.Put(), %d data taransfered\n\r", copied);
88-#endif
8978
9079 }
9180
@@ -94,32 +83,15 @@ uint8_t tx_buffer[1] = { 0x55 }, rx_buffer[1];
9483 void DoTestUart(void)
9584 {
9685 // MURASAKI_ASSERT(counter % 2 == 0, "Odd counter");
97-#if 0
98- unsigned int copied = test_fifo->Put(reinterpret_cast<const uint8_t *>(MSG1), sizeof(MSG1));
99- test_fifo->NotifyData();
100- murasaki::debugger->Printf("FIFO.Put(), %d data taransfered\n\r", copied);
101-#endif
10286
103-#if 0
104- murasaki::platform.spi_master->Transfer(murasaki::platform.slave_1, tx_buffer, rx_buffer, 1);
87+#if 1
88+ murasaki::platform.spi_master->TransmitAndReceive(
89+ murasaki::platform.slave_4, tx_buffer, rx_buffer, 1);
10590 #endif
10691
107-#if 0
108- char data[10];
109- unsigned int copied = test_fifo->Get(reinterpret_cast<uint8_t *>(data), sizeof(data));
110- if (copied == 0)
111- {
112- murasaki::debugger->Printf("FIFO.Get(), %d data taransfered \n\r", copied);
113-// test_fifo->ReWind();
114- test_fifo->NotifyData();
115- }
116- else {
117- murasaki::debugger->Printf("FIFO.Get(), %d data taransfered : '%10s'\n\r", copied, data);
118- }
119-#endif
12092 // by murasaki debugging output. You can use this in both task and interrupt context.
12193 // non blocking
122- murasaki::debugger->Printf(MSG, counter);
94+ murasaki::debugger->Printf(MSG, counter++);
12395
12496 }
12597
--- a/stm32_development/murasaki/Src/stm32f7xx_hal_msp.c
+++ b/stm32_development/murasaki/Src/stm32f7xx_hal_msp.c
@@ -154,6 +154,9 @@ void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
154154
155155 __HAL_LINKDMA(hspi,hdmarx,hdma_spi1_rx);
156156
157+ /* SPI1 interrupt Init */
158+ HAL_NVIC_SetPriority(SPI1_IRQn, 5, 0);
159+ HAL_NVIC_EnableIRQ(SPI1_IRQn);
157160 /* USER CODE BEGIN SPI1_MspInit 1 */
158161
159162 /* USER CODE END SPI1_MspInit 1 */
@@ -182,6 +185,9 @@ void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi)
182185 /* SPI1 DMA DeInit */
183186 HAL_DMA_DeInit(hspi->hdmatx);
184187 HAL_DMA_DeInit(hspi->hdmarx);
188+
189+ /* SPI1 interrupt DeInit */
190+ HAL_NVIC_DisableIRQ(SPI1_IRQn);
185191 /* USER CODE BEGIN SPI1_MspDeInit 1 */
186192
187193 /* USER CODE END SPI1_MspDeInit 1 */
--- a/stm32_development/murasaki/Src/stm32f7xx_it.c
+++ b/stm32_development/murasaki/Src/stm32f7xx_it.c
@@ -43,6 +43,7 @@
4343 /* External variables --------------------------------------------------------*/
4444 extern DMA_HandleTypeDef hdma_spi1_tx;
4545 extern DMA_HandleTypeDef hdma_spi1_rx;
46+extern SPI_HandleTypeDef hspi1;
4647 extern DMA_HandleTypeDef hdma_usart3_tx;
4748 extern DMA_HandleTypeDef hdma_usart3_rx;
4849 extern UART_HandleTypeDef huart3;
@@ -117,6 +118,20 @@ void EXTI9_5_IRQHandler(void)
117118 }
118119
119120 /**
121+* @brief This function handles SPI1 global interrupt.
122+*/
123+void SPI1_IRQHandler(void)
124+{
125+ /* USER CODE BEGIN SPI1_IRQn 0 */
126+
127+ /* USER CODE END SPI1_IRQn 0 */
128+ HAL_SPI_IRQHandler(&hspi1);
129+ /* USER CODE BEGIN SPI1_IRQn 1 */
130+
131+ /* USER CODE END SPI1_IRQn 1 */
132+}
133+
134+/**
120135 * @brief This function handles USART3 global interrupt.
121136 */
122137 void USART3_IRQHandler(void)
--- a/stm32_development/murasaki/murasaki.ioc
+++ b/stm32_development/murasaki/murasaki.ioc
@@ -122,6 +122,7 @@ NVIC.MemoryManagement_IRQn=true\:0\:0\:false\:false\:false\:false\:true
122122 NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:false\:false\:true
123123 NVIC.PendSV_IRQn=true\:15\:0\:false\:false\:false\:true\:true
124124 NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
125+NVIC.SPI1_IRQn=true\:5\:0\:false\:false\:true\:true\:true
125126 NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:false\:false\:true
126127 NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:true\:true
127128 NVIC.TIM8_TRG_COM_TIM14_IRQn=true\:0\:0\:false\:false\:true\:false\:false
@@ -300,56 +301,60 @@ ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL,2-MX_DMA_Init-DMA-
300301 RCC.48MHZClocksFreq_Value=24000000
301302 RCC.ADC12outputFreq_Value=72000000
302303 RCC.ADC34outputFreq_Value=72000000
303-RCC.AHBFreq_Value=16000000
304-RCC.APB1CLKDivider=RCC_HCLK_DIV2
305-RCC.APB1Freq_Value=8000000
306-RCC.APB1TimFreq_Value=16000000
307-RCC.APB2Freq_Value=16000000
308-RCC.APB2TimFreq_Value=16000000
304+RCC.AHBFreq_Value=216000000
305+RCC.APB1CLKDivider=RCC_HCLK_DIV4
306+RCC.APB1Freq_Value=54000000
307+RCC.APB1TimFreq_Value=108000000
308+RCC.APB2CLKDivider=RCC_HCLK_DIV4
309+RCC.APB2Freq_Value=54000000
310+RCC.APB2TimFreq_Value=108000000
309311 RCC.CECFreq_Value=32786.88524590164
310-RCC.CortexFreq_Value=16000000
311-RCC.EthernetFreq_Value=16000000
312-RCC.FCLKCortexFreq_Value=16000000
312+RCC.CortexFreq_Value=216000000
313+RCC.EthernetFreq_Value=216000000
314+RCC.FCLKCortexFreq_Value=216000000
313315 RCC.FamilyName=M
314-RCC.HCLKFreq_Value=16000000
316+RCC.HCLKFreq_Value=216000000
315317 RCC.HSE_VALUE=8000000
316318 RCC.HSI_VALUE=16000000
317-RCC.I2C1Freq_Value=8000000
318-RCC.I2C2Freq_Value=8000000
319-RCC.I2C3Freq_Value=8000000
320-RCC.I2C4Freq_Value=8000000
319+RCC.I2C1Freq_Value=54000000
320+RCC.I2C2Freq_Value=54000000
321+RCC.I2C3Freq_Value=54000000
322+RCC.I2C4Freq_Value=54000000
321323 RCC.I2SClocksFreq_Value=48000000
322-RCC.I2SFreq_Value=96000000
323-RCC.IPParameters=48MHZClocksFreq_Value,ADC12outputFreq_Value,ADC34outputFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2Freq_Value,APB2TimFreq_Value,CECFreq_Value,CortexFreq_Value,EthernetFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,I2C4Freq_Value,I2SClocksFreq_Value,I2SFreq_Value,LCDTFToutputFreq_Value,LPTIM1Freq_Value,LSE_VALUE,LSI_VALUE,MCO1PinFreq_Value,MCO2PinFreq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLI2SPCLKFreq_Value,PLLI2SQCLKFreq_Value,PLLI2SRCLKFreq_Value,PLLI2SRoutputFreq_Value,PLLMCOFreq_Value,PLLMUL,PLLQCLKFreq_Value,PLLQoutputFreq_Value,PLLSAIPCLKFreq_Value,PLLSAIQCLKFreq_Value,PLLSAIRCLKFreq_Value,PLLSAIoutputFreq_Value,PRESCALERUSB,RNGFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SAI1Freq_Value,SAI2Freq_Value,SDMMCFreq_Value,SPDIFRXFreq_Value,SYSCLKFreq_VALUE,SYSCLKSourceVirtual,TIM15Freq_Value,TIM16Freq_Value,TIM17Freq_Value,TIM1Freq_Value,TIM20Freq_Value,TIM2Freq_Value,TIM3Freq_Value,TIM8Freq_Value,UART4Freq_Value,UART5Freq_Value,UART7Freq_Value,UART8Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USART6Freq_Value,USBFreq_Value,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutput2Freq_Value,VCOOutputFreq_Value,VCOSAIOutputFreq_Value,VcooutputI2S,WatchDogFreq_Value
324-RCC.LCDTFToutputFreq_Value=48000000
325-RCC.LPTIM1Freq_Value=8000000
324+RCC.I2SFreq_Value=192000000
325+RCC.IPParameters=48MHZClocksFreq_Value,ADC12outputFreq_Value,ADC34outputFreq_Value,AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,CECFreq_Value,CortexFreq_Value,EthernetFreq_Value,FCLKCortexFreq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,HSI_VALUE,I2C1Freq_Value,I2C2Freq_Value,I2C3Freq_Value,I2C4Freq_Value,I2SClocksFreq_Value,I2SFreq_Value,LCDTFToutputFreq_Value,LPTIM1Freq_Value,LSE_VALUE,LSI_VALUE,MCO1PinFreq_Value,MCO2PinFreq_Value,MCOFreq_Value,PLLCLKFreq_Value,PLLI2SPCLKFreq_Value,PLLI2SQCLKFreq_Value,PLLI2SRCLKFreq_Value,PLLI2SRoutputFreq_Value,PLLM,PLLMCOFreq_Value,PLLMUL,PLLN,PLLQCLKFreq_Value,PLLQoutputFreq_Value,PLLSAIPCLKFreq_Value,PLLSAIQCLKFreq_Value,PLLSAIRCLKFreq_Value,PLLSAIoutputFreq_Value,PRESCALERUSB,RNGFreq_Value,RTCFreq_Value,RTCHSEDivFreq_Value,SAI1Freq_Value,SAI2Freq_Value,SDMMCFreq_Value,SPDIFRXFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,SYSCLKSourceVirtual,TIM15Freq_Value,TIM16Freq_Value,TIM17Freq_Value,TIM1Freq_Value,TIM20Freq_Value,TIM2Freq_Value,TIM3Freq_Value,TIM8Freq_Value,UART4Freq_Value,UART5Freq_Value,UART7Freq_Value,UART8Freq_Value,USART1Freq_Value,USART2Freq_Value,USART3Freq_Value,USART6Freq_Value,USBFreq_Value,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutput2Freq_Value,VCOOutputFreq_Value,VCOSAIOutputFreq_Value,VcooutputI2S,WatchDogFreq_Value
326+RCC.LCDTFToutputFreq_Value=96000000
327+RCC.LPTIM1Freq_Value=54000000
326328 RCC.LSE_VALUE=32768
327329 RCC.LSI_VALUE=32000
328330 RCC.MCO1PinFreq_Value=16000000
329-RCC.MCO2PinFreq_Value=16000000
331+RCC.MCO2PinFreq_Value=216000000
330332 RCC.MCOFreq_Value=72000000
331-RCC.PLLCLKFreq_Value=96000000
332-RCC.PLLI2SPCLKFreq_Value=96000000
333-RCC.PLLI2SQCLKFreq_Value=96000000
334-RCC.PLLI2SRCLKFreq_Value=96000000
335-RCC.PLLI2SRoutputFreq_Value=96000000
333+RCC.PLLCLKFreq_Value=216000000
334+RCC.PLLI2SPCLKFreq_Value=192000000
335+RCC.PLLI2SQCLKFreq_Value=192000000
336+RCC.PLLI2SRCLKFreq_Value=192000000
337+RCC.PLLI2SRoutputFreq_Value=192000000
338+RCC.PLLM=8
336339 RCC.PLLMCOFreq_Value=72000000
337340 RCC.PLLMUL=RCC_PLL_MUL9
338-RCC.PLLQCLKFreq_Value=96000000
339-RCC.PLLQoutputFreq_Value=96000000
340-RCC.PLLSAIPCLKFreq_Value=96000000
341-RCC.PLLSAIQCLKFreq_Value=96000000
342-RCC.PLLSAIRCLKFreq_Value=96000000
343-RCC.PLLSAIoutputFreq_Value=96000000
341+RCC.PLLN=216
342+RCC.PLLQCLKFreq_Value=216000000
343+RCC.PLLQoutputFreq_Value=216000000
344+RCC.PLLSAIPCLKFreq_Value=192000000
345+RCC.PLLSAIQCLKFreq_Value=192000000
346+RCC.PLLSAIRCLKFreq_Value=192000000
347+RCC.PLLSAIoutputFreq_Value=192000000
344348 RCC.PRESCALERUSB=RCC_USBCLKSOURCE_PLL_DIV1_5
345-RCC.RNGFreq_Value=96000000
349+RCC.RNGFreq_Value=216000000
346350 RCC.RTCFreq_Value=32000
347351 RCC.RTCHSEDivFreq_Value=4000000
348-RCC.SAI1Freq_Value=96000000
349-RCC.SAI2Freq_Value=96000000
350-RCC.SDMMCFreq_Value=16000000
351-RCC.SPDIFRXFreq_Value=96000000
352-RCC.SYSCLKFreq_VALUE=16000000
352+RCC.SAI1Freq_Value=192000000
353+RCC.SAI2Freq_Value=192000000
354+RCC.SDMMCFreq_Value=216000000
355+RCC.SPDIFRXFreq_Value=192000000
356+RCC.SYSCLKFreq_VALUE=216000000
357+RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
353358 RCC.SYSCLKSourceVirtual=RCC_SYSCLKSOURCE_PLLCLK
354359 RCC.TIM15Freq_Value=72000000
355360 RCC.TIM16Freq_Value=72000000
@@ -359,30 +364,33 @@ RCC.TIM20Freq_Value=72000000
359364 RCC.TIM2Freq_Value=72000000
360365 RCC.TIM3Freq_Value=72000000
361366 RCC.TIM8Freq_Value=72000000
362-RCC.UART4Freq_Value=8000000
363-RCC.UART5Freq_Value=8000000
364-RCC.UART7Freq_Value=8000000
365-RCC.UART8Freq_Value=8000000
366-RCC.USART1Freq_Value=16000000
367-RCC.USART2Freq_Value=8000000
368-RCC.USART3Freq_Value=8000000
369-RCC.USART6Freq_Value=16000000
370-RCC.USBFreq_Value=96000000
371-RCC.VCOI2SOutputFreq_Value=192000000
372-RCC.VCOInputFreq_Value=1000000
367+RCC.UART4Freq_Value=54000000
368+RCC.UART5Freq_Value=54000000
369+RCC.UART7Freq_Value=54000000
370+RCC.UART8Freq_Value=54000000
371+RCC.USART1Freq_Value=54000000
372+RCC.USART2Freq_Value=54000000
373+RCC.USART3Freq_Value=54000000
374+RCC.USART6Freq_Value=54000000
375+RCC.USBFreq_Value=216000000
376+RCC.VCOI2SOutputFreq_Value=384000000
377+RCC.VCOInputFreq_Value=2000000
373378 RCC.VCOOutput2Freq_Value=8000000
374-RCC.VCOOutputFreq_Value=192000000
375-RCC.VCOSAIOutputFreq_Value=192000000
379+RCC.VCOOutputFreq_Value=432000000
380+RCC.VCOSAIOutputFreq_Value=384000000
376381 RCC.VcooutputI2S=48000000
377382 RCC.WatchDogFreq_Value=32000
378383 SH.GPXTI13.0=GPIO_EXTI13
379384 SH.GPXTI13.ConfNb=1
380385 SH.GPXTI5.0=GPIO_EXTI5
381386 SH.GPXTI5.ConfNb=1
382-SPI1.CalculateBaudRate=8.0 MBits/s
387+SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_256
388+SPI1.CalculateBaudRate=210.937 KBits/s
389+SPI1.DataSize=SPI_DATASIZE_8BIT
383390 SPI1.Direction=SPI_DIRECTION_2LINES
384-SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate
391+SPI1.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,DataSize,BaudRatePrescaler,NSSPMode
385392 SPI1.Mode=SPI_MODE_MASTER
393+SPI1.NSSPMode=SPI_NSS_PULSE_DISABLE
386394 SPI1.VirtualType=VM_MASTER
387395 USART3.IPParameters=VirtualMode-Asynchronous,WordLength
388396 USART3.VirtualMode-Asynchronous=VM_ASYNC
--- a/stm32_development/murasaki/murasaki/spimaster.cpp
+++ b/stm32_development/murasaki/murasaki/spimaster.cpp
@@ -80,6 +80,7 @@ bool SpiMaster::TransmitAndReceive(murasaki::AbstractSpiSlaveSpecifier* spi_spec
8080
8181 // wait for the completion
8282 result = sync_->Wait(timeout_ms); // return false if timeout
83+
8384 }
8485 // Dessert the chip select for slave
8586 spi_spec->DeassertCs();