Skip to content

Baudrate error in kl15 #30

@markocont

Description

@markocont

Added rounding up and down for calculation of sbr.

/* Calculate baud settings */
float pre_sbr = (float)clockHz/(baudrate * 16); // per arrotondamento
sbr = (uint16_t)((clockHz)/(baudrate * 16));
    if (pre_sbr-sbr>0.5){
        sbr=sbr+1;
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions