i.mx6q flexcan from user mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.mx6q flexcan from user mode

661 Views
gruber
Contributor I

Hey folks,

since this is my first question here, first of all I wanted to say Hello!

We are developing a virtualized environment on i.mx6q at the moment. Now we are focussing a problem and there are only a few possibilities to explain the hardware behavior.

What do we want to do?

We want to use the flexcan module on i.mx6q and drive it from user mode. For most modules on i.mx6 this is no problem (GPIO, CCM for example) but Flexcan makes trouble. We checked the reference manual and found the SUPV bit in MCR register (RM chap. 26.8.1 page 1333f) which configures the FLEXCAN to be usable only from supervisor mode (if set) or not (if unset).

We unset this SUPV flag on boot level or use a hardware debugger to be sure allowing access from user mode. But hardware does not change behavior.

We also checked the access on one of our Linux environments on i.mx6. We are able to use /dev/mem with devmem2 to read register values from other modules like GPIO and CCM. Even we were not able to access flexcan, we see the same error.

Every access from user mode leads to a "synchronous external data abort".

Possible reasons (from our point of view - please add yours)

- There is another protection mechanism on hardware which is not mentioned in RM (AIPSTZ configuration looks fine)

- Unsetting the SUPV bit has to be done in a specific hardware state or something (no more infos in RM found)

- Hardware bug - SUPV bit has no effect (no known issue in errata found)

If you have any ideas for missusage from our side or workarounds, same benavior or ideas how to handle this, please let me know!

Kind Regards,

Martin

1 Reply

503 Views
igorpadykov
NXP Employee
NXP Employee

Hi Martin

seems fae is already working on that issue with application team on

Acess to CAN registers in user mode (i.MX6Q) 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply