Forum Rule: Always post complete source code & details to reproduce any issue!
Tab Content
  • bvernham's Avatar
    06-08-2021, 11:52 AM
    SA is source address. Sometimes when just monitoring J1939 you do not care about the source of the message just the PGN of the message. Thanks Bruce
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-08-2021, 01:49 AM
    So the 29 bit mask looks like 3C0FF 3E315 3FEFC 3FAF4 3FEFF 3FFFF 3FFFF 3FFFF
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-07-2021, 04:48 PM
    Right now I do not plan on masking 11 bit ID only 29 bit/J1939 ID's so that is where I will starts. Thanks for the patience. Bruce
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-07-2021, 12:48 PM
    Of all the things that could be messed up, you can not cast the baud rate calc as an uint16_t. That certainly is a "smack your forehead against a brick wall moment. So this is what the captured frames look like...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-07-2021, 11:30 AM
    That is the problem. I am setting up the MB correctly because it shows up in MBStatus. I am accepting all frames but I get no call back...makes no sense. I thought events() was for FIFO? FIFO is disabled. You...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-07-2021, 03:13 AM
    Well I replaced the user filter for the setmbfilter for the standard frames. Nothing. So then I bypassed all the filter setting and put setmbfilter accept all and still nothing. I can't understand why I can't get...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-07-2021, 12:11 AM
    For J1939 the don't care would be the SA and the rest would need to go the the necessary MB. For setMBUserFilter, if I only set one ID then should the mask just be all F's? because I only want to capture the one ID...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-06-2021, 10:02 PM
    As in the modified example code above I set 4 I'd of a dozen or so on the bus with setmbuserfilter and used 07ff as the mask. Only mb0 was receiving. I switched to setmbfilter and then only 4 IDs are are captured in...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-06-2021, 09:12 PM
    Thanks...Bruce
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-06-2021, 09:11 PM
    So what happens when I use it with setmbuserfilter? I can't use a mask to ignore J1939 SA and use enhancefilter? That still does not explain why I can't use a 7ff mask with the setmbuser filter as in the same code?...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-06-2021, 04:46 PM
    For the std frame I was using 0x7ff as the mask in the example. In my code I did both 0x7ff and 0...neither worked. Could it have something to do with "enhance filter". As you can see above in the example I had one...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-06-2021, 02:46 PM
    I used one of the FIFO examples to confirm my CAN bus hardware is good. I am using SavvyCAN and GRVET hardware. Thanks Collin. He has help me with Due CAN also. Anyways so then I went for it. So now I fell...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-06-2021, 12:13 PM
    I am using setMBUserFilter so I can use the mask so I can eventually do J1939 ID filtering (not implemented yet). This is why I am trying to grab the protocol type from the DBC file. As you can see in the code...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-06-2021, 02:53 AM
    By set up and CAN sourced are confirmed with the examples so I do not think that is the issue. Read in the DBC file and set the filters. There are only 45 ID's so 1 ID per filter. Set the common "onReceive"...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-04-2021, 02:28 PM
    So the whole system (other than just the CAN) can be set up before filling up all the MB with message which will call an interrupt to clear it.
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-04-2021, 11:39 AM
    I am just wondering if FLEXCAN_EnterFreezeMode would help avoid having MB fill up on one controller while another controller or some other device is set up? I envision set up a controller, freezing it while doing the...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-04-2021, 01:55 AM
    Can you explain the following functions: FLEXCAN_EnterFreezeMode and enableDMA Thanks
    775 replies | 72796 view(s)
  • bvernham's Avatar
    06-01-2021, 03:01 PM
    Just in case anyone is interested this is where I have gotten so far: Work with mixed standard and extended in each DBC file.
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-31-2021, 12:48 PM
    Duh... But I think you mean: myCAN->setMB((FLEXCAN_MAILBOX)i,RX,STD);? Thanks Bruce
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-31-2021, 12:22 PM
    for (int i = 0; i<NUM_TX_MAILBOXES; i++) { if (bus.STDFrame == 0) { myCAN->setMB(i,TX,EXT); } Then the compiler complains
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-31-2021, 12:00 PM
    Yeah, I duplicated it...missed it. Does it matter which one is included? virtual void onReceive(const FLEXCAN_MAILBOX &mb_num, _MB_ptr handler) = 0; /* individual mailbox callback function */ //virtual void...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-31-2021, 02:55 AM
    What about the function overloading for baud rate? Also it does not seem to like C:\Users\bvernham\Dropbox (Isuzu North America)\Personal...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-31-2021, 01:56 AM
    static FlexCAN_T4_Base* myCAN = { nullptr }; FlexCAN_T4<CAN1, RX_SIZE_2, TX_SIZE_16> Can1; FlexCAN_T4<CAN2, RX_SIZE_2, TX_SIZE_16> Can2; FlexCAN_T4<CAN3, RX_SIZE_2, TX_SIZE_16> Can3; bool StartCAN() { myCAN =...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-30-2021, 11:39 PM
    I will 100% have to take your word for it as I can't find anything like the on the interweb.... Thanks I dive it and let you know.
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-30-2021, 07:53 PM
    FCTPFD_CLASS class FlexCAN_T4FD : public FlexCAN_T4_Base { public: virtual bool setMBUserFilter(FLEXCAN_MAILBOX mb_num, uint32_t id1, uint32_t id2, uint32_t id3, uint32_t id4, uint32_t mask) = 0{;} ?? I tried to...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-30-2021, 12:17 PM
    Well you are right because it is in github. I am right because it was not packaged with Teensyduino. Which also makes sense because when I compiled some examples I got compiler warnings. No, I am not using all...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-30-2021, 02:04 AM
    bool setMBUserFilter(FLEXCAN_MAILBOX mb_num, uint32_t id1, uint32_t mask); bool setMBUserFilter(FLEXCAN_MAILBOX mb_num, uint32_t id1, uint32_t id2, uint32_t mask); bool setMBUserFilter(FLEXCAN_MAILBOX mb_num,...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-29-2021, 12:19 AM
    class FlexCAN_T4_Base { virtual void begin() = 0; virtual void setBaudRate(uint32_t baud = 1000000, FLEXCAN_RXTX listen_only = TX) = 0; :confused: Thanks Bruce
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-28-2021, 08:36 PM
    :confused: They don't have a "mind blown emoji"..... class FlexCAN_T4_Base { so got the base class Got the FCTP_CLASS class FlexCAN_T4 : public FlexCAN_T4_Base { templated class So
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-28-2021, 01:43 PM
    I am only setting up a controller if there is a corresponding DBC file. So if the DBC file has no messages (no file) then I am not setting up that controller. I have no idea which can controller the user will have...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-28-2021, 12:26 PM
    I want to set everything up in a loop. I have possibly 3 DBC files on the SD card. Read in and parsed into a structure. If there are PID's in the DBC file, the message ID is in a certain range so those are parsed...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-28-2021, 12:33 AM
    There is no way to use the templated objects in such a manner. Otherwise going to have to set up a lot if "case statement" to go through the set up of all 3 buses. Any other thought on how to set this up on in a...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-27-2021, 05:18 PM
    static FlexCAN_T4_Base* myCAN = { nullptr }; FlexCAN_T4<CAN1, RX_SIZE_2, TX_SIZE_16> Can0; FlexCAN_T4<CAN2, RX_SIZE_2, TX_SIZE_16> Can1; FlexCAN_T4<CAN3, RX_SIZE_2, TX_SIZE_16> Can2; bool StartCAN() { myCAN =...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-27-2021, 01:46 PM
    Thanks for helping with my ignorance. static FlexCAN_T4_Base* myCAN = { nullptr }; FlexCAN_T4<CAN1, RX_SIZE_2, TX_SIZE_16> Can0; FlexCAN_T4<CAN2, RX_SIZE_2, TX_SIZE_16> Can1; FlexCAN_T4<CAN3, RX_SIZE_2,...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-27-2021, 01:19 PM
    In the form of?: static FlexCAN_T4_Base* myCAN; static FlexCAN_T4_Base* myCAN; static FlexCAN_T4_Base* myCAN; FlexCAN_T4<CAN1, RX_SIZE_2, TX_SIZE_16> myCAN; FlexCAN_T4<CAN2, RX_SIZE_2, TX_SIZE_16> myCAN;...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-27-2021, 12:24 PM
    By creating 3 pointers you mean?: FlexCAN_T4<CAN1, RX_SIZE_2, TX_SIZE_16> myCAN; FlexCAN_T4<CAN2, RX_SIZE_2, TX_SIZE_16> myCAN; FlexCAN_T4<CAN3, RX_SIZE_2, TX_SIZE_16> myCAN; It is a lot easier/neater to call...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-23-2021, 11:47 PM
    Standard C library for AVR-GCC: https://www.nongnu.org/avr-libc/user-manual/index.html Thanks Bruce
    3 replies | 169 view(s)
  • bvernham's Avatar
    05-23-2021, 09:53 PM
    Is char * strcasestr (const char *, const char *) __ATTR_PURE__ supported? When I try to include it I get "error: 'strcasestr' was not declared in this scope" but strstr is fine : "!strstr(tempname, "PID")". ...
    3 replies | 169 view(s)
  • bvernham's Avatar
    05-23-2021, 04:09 PM
    Would have have to declare myCAN in advance like and array? You can't declare myCAN...myCAN you would need to declare myCAN,myCAN,myCAN? Thanks Bruce
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-22-2021, 08:11 PM
    One hopefully not stupid question. Instead of FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> myCAN1; Can it be declared as FlexCAN_T4<CAN1, RX_SIZE_2, TX_SIZE_16> myCAN; ? This make thing a lot easier when calling...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-21-2021, 07:54 PM
    Thanks for all the help....time to dive into the deep end with the anchor around my need.
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-21-2021, 06:33 PM
    So when and interrupt enabled the received data is copied to the message structure without read(msg). If you enable interrupts for each of the 3 can controllers on the 4.1 then are 3 message structures created in the...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-21-2021, 05:49 PM
    So by polling you mean if ( can1.read(msg) ) { which will read any mailbox which occupied or use an interrupt and set the call back in which you do not need to use the can1.read(msg) And FIFO use .events() and you...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-21-2021, 12:10 PM
    There is no latency in entering and exiting the ISR? Don't the statuses need to be pushed and popped from the stack? That doesn't take any clock cycles? What is the difference between calling events() in the loop...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-21-2021, 01:24 AM
    OK, now I am even more confused then before. My concept is to use the mailboxes to filter the messages in the DBC files so I do not need to search the list of messages to find the signals which are needed to...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-20-2021, 07:41 PM
    So the RX queue is not really needed if everything is put into a mailbox? So essentially I would used the void onReceive(_MB_ptr handler); /* global callback function */ and then reference the MB which was received?...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-20-2021, 02:27 PM
    Can you explain the relationship between the "RX_SIZE" and "TX_SIZE" to the # of mail boxes? FlexCAN_T4<CAN1, RX_SIZE_256, TX_SIZE_16> myCan1; Is the RX and TX queues global to each of the can channels or per mail...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-19-2021, 01:29 AM
    Sorry I did not reply sooner but I just parsed 3 files...two specific to a project and one with some general PIDS just to test it. Stats are as follows: CAN1.dbc CAN2.dbc CAN3.dbc Total Signal Count: 831 CAN:...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-13-2021, 05:55 PM
    Another quick question, what happens if I have more than say 60 mailboxes X 4 so 240 message of interest on the buss. How would I filter the rest of the traffic? Also, if ISO-TP is also required, does this only work...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-13-2021, 02:01 PM
    Thanks for the great work. I have never work with Ethernet with a micro before so I am just fumbling around. I developed a CAN BOB for the 4.1 which included Ethernet. I tried the Link example but it says there...
    190 replies | 26328 view(s)
  • bvernham's Avatar
    05-10-2021, 01:20 PM
    How would you handle J1939? For example, how would you filter to ignore source and/or destination in the message ID? Thanks Bruce
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-10-2021, 12:29 PM
    Thanks for the quick response. The #'s you are quoting above are they for each can instance (can1,2 and 3) or for all 3? Is there a way to set the automatic filtering in a loop or an array? MB filter bool...
    775 replies | 72796 view(s)
  • bvernham's Avatar
    05-10-2021, 12:53 AM
    Great work here. I am try to find out more of an understanding of the best way to set up for receiving specific messages. But, I do not know the messages at compile time so I need to set the filters in a loop. I am...
    775 replies | 72796 view(s)
No More Results
About bvernham

Basic Information

Statistics


Total Posts
Total Posts
84
Posts Per Day
0.04
Last Post
FlexCAN_T4 - FlexCAN for Teensy 4 06-08-2021 11:52 AM
General Information
Last Activity
06-08-2021 11:52 AM
Join Date
02-16-2015