- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Can you please have a look at the application note:http://www.cypress.com/documentation/application-notes/an52701-psoc-3-and-psoc-5lp-getting-started-c....
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello
Can you please have a look at the application note:http://www.cypress.com/documentation/application-notes/an52701-psoc-3-and-psoc-5lp-getting-started-c....
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Hima
Thanks for the suggest but i have seen already this AN, but anyway looking deeper on the code, i note i difference betwen the AN52701 and the code generate for the KIT CY8CKIT-059.
The AN52701, have file CAN_Data_TX_RX_func.c , where we can found the function called by the main.c : CAN_SendMsgTxMessage1(void)
following the code:
uint8 CAN_SendMsgTxMessage1(void)
{
uint8 result = CYRET_SUCCESS;
if ((CAN_TX[0u].txcmd.byte[0u] & CAN_TX_REQUEST_PENDING) ==
CAN_TX_REQUEST_PENDING)
{
result = CAN_FAIL;
}
else
{
/* `#START MESSAGE_TxMessage1_TRASMITTED` */
/* `#END` */
CY_SET_REG32((reg32 *) &CAN_TX[0u].txcmd, CAN_SEND_MESSAGE);
}
return(result);
}
As you can see the condiction, if ((CAN_TX[0u].txcmd.byte[0u] & CAN_TX_REQUEST_PENDING) ==
CAN_TX_REQUEST_PENDING)
have a compare with "CAN_TX_REQUEST_PENDING" define as 01u, but to the kit code we have:
#if (CY_PSOC3 || CY_PSOC5)
if ((CAN_Data_TX[0u].txcmd.byte[0u] & CAN_Data_TX_REQUEST_PENDING) != 0u).
This means that we have always the CAN_FAIL due to 0u and not 01u.
Actually i am doing a service to the Bolivia forest , and no way to do any test until next week
Please anyway could you give to me your opinion?
Best regards
Attilio