SAM71Q21 clock selection for peripheral TC5

Discussions around product based on ARM Cortex M7 core.
This forum will be discontinued soon.

Moderator: nferre

sleven79
Posts: 2
Joined: Fri Sep 11, 2015 8:24 am

SAM71Q21 clock selection for peripheral TC5

Fri Sep 11, 2015 11:15 am

Hi !

I currently discover the SAMV7 XPlained Ultra board. In SAMV71Q21, I tried to configure the clock for the TC5 counter peripheral (PID 28).

I would like to use MCK/2 for TC5. According to the datasheet, MCK/2 can be programmed in the PMC.

What I tried is, while TC5 peripheral is unclocked (unpowered, PMC->PMC_PCSR0 bit 28 is 0):

PMC->PMC_PCR = PMC_PCR_PERIPH_DIV2_MCK | PMC_PCR_CMD | ID_TC5;

However, after writing to PMC_PCR, the clock for peripheral TC5 still seems to be MCK, and does not switch to MCK/2.

Can anyone help me explain this and give me a hint how I can correctly configure MCK/2 in PMC for peripheral TC5?

Thanks,
Severin
ybp
Posts: 4
Joined: Thu Sep 10, 2015 9:46 am

Re: SAM71Q21 clock selection for peripheral TC5

Fri Sep 11, 2015 1:20 pm

Hello Severin,


The datasheets needs to be updated. The PCK feature is not available in SAM V71. You cannot generate a MCK divided clock using the same..

regards,
ybp
sleven79
Posts: 2
Joined: Fri Sep 11, 2015 8:24 am

Re: SAM71Q21 clock selection for peripheral TC5

Fri Sep 11, 2015 3:59 pm

Thanks ybp,

indeed, the datasheet of the SAMV71 I have says "Preliminary Datasheet".

So, to scale the clock of TC5, I will directly use the TCCLKS bits in TC1->TC_CMR2 (for timer channel TC5). That works.

This enables using either MCK/8, MCK/32, MCK/128, SCLK, or PCK6 as clock source, assuming the datasheet is correct here. In any case, I will measure the result.

I hope an updated datasheet becomes available soon.

Thanks,
Severin

Return to “SAM Cortex-M7 MCU”

Who is online

Users browsing this forum: No registered users and 1 guest