sipeed / Longduino

Longduino is an Arduino port for gd32v mcu.
Other
69 stars 21 forks source link

enable cycle counter for pulseIn function #23

Closed ottojo closed 3 years ago

ottojo commented 3 years ago

When using Longduino on a Longan nano using platform-io, pulseIn did not return. Upon further inspection, rdcycle seemed to return a constant value. Marking the inline assembly volatile and enabling the mcount cycle counter seems to solve this problem.

bitsk commented 3 years ago

Thanks!