[no subject]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  pwmo = bit_time_in_minimum_time_quantum % pwm;

Same for the PWMS and PWML. I am not yet sure how to calculate those
(more on this below) but these seem to be calculated once for all (like
any bittimming value other than the TDCs).

Let me know if I missed something, the PWM is very new to me :)


So, for the implementation, I am thinking of:

1. Add a CAN_CTRLMODE_PWM mode and a new nest for the PWM in netlink.h

2. Add these to bittiming.c:

  struct can_pwm {
  	u32 pwms; /* PWM short phase length */
  	u32 pwml; /* PWM long phase length */
  	u32 pwmo; /* PWM offset */
  };

  struct can_pwm_const {
  	u32 pwms_max;
  	u32 pwml_max;
  	u32 pwmo_max;
  };

  static inline u32 can_get_pwm(const struct can_pwm *pwm)
  {
  	return pwm->pwms + pwm->pwml;
  }

The minimum value of all those configurable ranges is already specified
to be one minimum time quantum (tq min), so I do not think we need a
field for the minimums.


At the moment, I am stuck on the PWM calculation. I do not know how to
derive good PWMS and PWML values out of the const ranges.

The ISO 11898-1:2024 tells me that CiA 612-2 has recommendations on the
topic. But getting access to this document requires a subscription
(which I do not have):


https://www.can-cia.org/can-knowledge/cia-612-series-can-xl-guidelines-and-application-notes

Do any of you have access to this document? Or do any of you know a good
formula for the PWMS and PWML calculation?

Thank you,


Yours sincerely,
Vincent Mailhol





[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux