SAMV71-XULT: Add call to can_txready() to MCAN driver. This is part of a fix to a CAN hang problem
This commit is contained in:
parent
c90876ff9c
commit
1299160d1d
@ -223,6 +223,7 @@ config SAMV7_MCAN0
|
||||
bool "CAN controller 0 (MCAN0)"
|
||||
default n
|
||||
select CAN
|
||||
select CAN_TXREADY
|
||||
select SAMV7_MCAN
|
||||
|
||||
config SAMV7_MCAN1
|
||||
@ -230,6 +231,7 @@ config SAMV7_MCAN1
|
||||
default n
|
||||
depends on SAMV7_HAVE_MCAN1
|
||||
select CAN
|
||||
select CAN_TXREADY
|
||||
select SAMV7_MCAN
|
||||
|
||||
config SAMV7_DAC0
|
||||
|
@ -128,6 +128,12 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* General Configuration ****************************************************/
|
||||
|
||||
#ifndef CONFIG_CAN_TXREADY
|
||||
# warning WARNING!!! CONFIG_CAN_TXREADY is required by this driver
|
||||
#endif
|
||||
|
||||
/* MCAN0 Configuration ******************************************************/
|
||||
|
||||
#ifdef CONFIG_SAMV7_MCAN0
|
||||
@ -3190,6 +3196,14 @@ static void mcan_interrupt(FAR struct can_dev_s *dev)
|
||||
|
||||
mcan_buffer_release(priv);
|
||||
handled = true;
|
||||
|
||||
#ifdef CONFIG_CAN_TXREADY
|
||||
/* Inform the upper half driver that we are again ready to accept
|
||||
* data in mcan_send().
|
||||
*/
|
||||
|
||||
can_txready(dev);
|
||||
#endif
|
||||
}
|
||||
else if ((pending & priv->txints) != 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user