File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -581,6 +581,7 @@ void can_free(can_t *obj) {
581
581
}
582
582
583
583
int can_frequency (can_t * obj , int f ) {
584
+ __IO uint32_t * dmy_cfcc ;
584
585
int retval = 0 ;
585
586
586
587
if (f <= 1000000 ) {
@@ -590,6 +591,12 @@ int can_frequency(can_t *obj, int f) {
590
591
can_set_frequency (obj , f );
591
592
/* set Channel Communication mode */
592
593
can_set_channel_mode (obj -> ch , CH_COMM );
594
+ /* restore CFE bit since it is cleared */
595
+ /* Use send/receive FIFO buffer */
596
+ dmy_cfcc = CFCC_TBL [obj -> ch ][CAN_SEND ];
597
+ * dmy_cfcc |= 0x01 ;
598
+ dmy_cfcc = CFCC_TBL [obj -> ch ][CAN_RECV ];
599
+ * dmy_cfcc |= 0x01 ;
593
600
retval = 1 ;
594
601
}
595
602
Original file line number Diff line number Diff line change @@ -598,6 +598,7 @@ void can_free(can_t *obj) {
598
598
}
599
599
600
600
int can_frequency (can_t * obj , int f ) {
601
+ __IO uint32_t * dmy_cfcc ;
601
602
int retval = 0 ;
602
603
603
604
if (f <= 1000000 ) {
@@ -607,6 +608,12 @@ int can_frequency(can_t *obj, int f) {
607
608
can_set_frequency (obj , f );
608
609
/* set Channel Communication mode */
609
610
can_set_channel_mode (obj -> ch , CH_COMM );
611
+ /* restore CFE bit since it is cleared */
612
+ /* Use send/receive FIFO buffer */
613
+ dmy_cfcc = CFCC_TBL [obj -> ch ][CAN_SEND ];
614
+ * dmy_cfcc |= 0x01 ;
615
+ dmy_cfcc = CFCC_TBL [obj -> ch ][CAN_RECV ];
616
+ * dmy_cfcc |= 0x01 ;
610
617
retval = 1 ;
611
618
}
612
619
You can’t perform that action at this time.
0 commit comments