RTEMS | Draft: cpukit: add support for common CAN/CAN FD stack (!49)

Pavel Pisa (@ppisa) gitlab at rtems.org
Fri Jun 28 10:42:25 UTC 2024




Pavel Pisa commented on a discussion on cpukit/dev/can/ctucanfd/ctucanfd_priv.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/49#note_108446

 > +* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 > +* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 > +* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 > +* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 > +* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 > +* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 > +* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 > +* POSSIBILITY OF SUCH DAMAGE.
 > +*/
 > +
 > +#include <dev/can/can-queue.h>
 > +
 > +#ifndef __CTUCANFD_PRIV_H
 > +#define __CTUCANFD_PRIV_H
 > +
 > +#define CTUCANFD_NTXBUFS_MAX ( 8 )

The value has no impact on generic code and for CTU CAN FD the actual number of synthesized buffers is read from hardware. The eight is maximum which can be implemented with actual register sizes and offsets, the Tx priority register needs 4 bits per buffer and its total size is none 32 bit word. And it is required that whole word is rewritten in one go during priorities update. So on 16-bit system only 16-bits and 4 buffers can be implemented. 4 buffers is usual default to keep core of reasonable size as well.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/49#note_108446
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240628/9313ee55/attachment.htm>


More information about the bugs mailing list