HiI try to run SPI 1 on STM32F103C8 but when i send data i have only SCK signal. MOSI(PB5) is in high state (dont change). SPI2 on PORTA works grate.void MX_SPI1_Init(void)
{
/* USER CODE BEGIN SPI1_Init 0 */
/* USER CODE END SPI1_Init 0 */
...
I am working on power management and I put MCU in sleep mode (no low-power), but it doesn't wake up when it receives a CAN frame, it stays in sleep mode. I would like any CAN frame to wake up the MCU.To switch to sleep mode I use :HAL_SuspendTick();
...
I try tu send CAN REMOTE RTR frame but MCU always send DATA FRAME txtype.RTR = CAN_RTR_REMOTE; txtype.IDE=CAN_ID_STD; txtype.DLC=0; HAL_CAN_AddTxMessage(&hcan, &txtype, txData, &TxMailbox);result 0x022;0; not 0x022;Remote ...
Yes I check this at first time. HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, RESET);HAL_GPIO_WritePin(GPIOB, GPIO_PIN_5, SET);works ok (whene SPI1 is disabled)I also replase MCU to new one.
__HAL_AFIO_REMAP_SPI1_ENABLE(); is enable by HAL HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
__HAL_AFIO_REMAP_SPI1_ENABLE();
/* USER CODE BEGIN SPI1_MspInit 1 */
/* USER CODE END SPI1_MspInit 1 */
}
}