t
Fork of mbed-dev by
Diff: targets/TARGET_RENESAS/TARGET_RZ_A1H/can_api.c
- Revision:
- 153:fa9ff456f731
- Parent:
- 149:156823d33999
- Child:
- 167:e84263d55307
--- a/targets/TARGET_RENESAS/TARGET_RZ_A1H/can_api.c Thu Dec 15 11:48:27 2016 +0000 +++ b/targets/TARGET_RENESAS/TARGET_RZ_A1H/can_api.c Tue Dec 20 17:27:56 2016 +0000 @@ -581,6 +581,7 @@ } int can_frequency(can_t *obj, int f) { + __IO uint32_t *dmy_cfcc; int retval = 0; if (f <= 1000000) { @@ -590,6 +591,12 @@ can_set_frequency(obj, f); /* set Channel Communication mode */ can_set_channel_mode(obj->ch, CH_COMM); + /* restore CFE bit since it is cleared */ + /* Use send/receive FIFO buffer */ + dmy_cfcc = CFCC_TBL[obj->ch][CAN_SEND]; + *dmy_cfcc |= 0x01; + dmy_cfcc = CFCC_TBL[obj->ch][CAN_RECV]; + *dmy_cfcc |= 0x01; retval = 1; }