2016-04-13 09:02 AM
hi all
i get for transmission data with using can protocol with stm32f429, i studied ''can primer'' article from keil.com also reading user manual of ''stm32f429'' . i configured can parametrs an all of things we can configure in ''Cubemx'' and generating code for use in keil V5 . ok . thats write, good , now how i can sending data ??!! in HAL driver we have few of functions about transmit and receive but all of them no more parameters in their argumans about whats your data for transmit . for example HAL_CAN_Transmit(CAN_HandleTypeDef *hcan, uint32_t Timeout); how i can send my data into TX mailbox's?? #canbus #stm32 #hal #can #cubemx2016-04-14 02:30 AM
Hi media.pooyesh ,
I recommend you to have a look to the CAN example under the STM32F4 cube firmware package it may be helpful: STM32Cube_FW_F4_V1.11.0\Projects\STM324x9I_EVAL\Examples\CAN-Syrine –2016-04-16 06:36 AM
tnx alot my friend . i test it and share result .
2016-04-23 12:53 AM
hello again dear friend
its not work . i tried it and successfully compiled with keil but not working . can init and filter config is to seem corrected because returned HAL_OK but ''can transmit'' and ''receive'' can't returned HAL_OK :|2016-04-23 03:50 AM
i founded that two functions we called what returned their status.
HAL_TIMEOUT :) ok,good. so what can i do for this ?? !2016-04-23 05:18 AM
2016-04-23 07:00 AM
NO . i used loopback mode operation but its solved . i modified buadrate to 500Kbps and
accidentally i changed it from 500 to 250kbps and problem is solved . but why? its suport up to 1Mbps and with 500Kbps ''HAL_CAN_INIT'' function is correctly initialized and returned ''HAL_OK'' but in transmit and receive function we have ''HAL_TIMEOUT'' status ,,, :| :| :|
2016-04-23 07:21 PM
Suggest you present your code and hardware in a more complete and comprehensive manner, getting marginal insight from postings so far.
If the HAL isn't workable, look at several working SPL examples posted here on the forum.