Not applicable
May 29, 2015
07:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 29, 2015
07:14 AM
Hello,
does someone of you know how the Bit Protection configuration for the KSCFG register works?
The documentations says:
"1b ... is updated with the written value."
Does this 1 denotes the current state of the bit when writing to the configured bit or to value to be written when writing to the configured bit? Do I have to issue two writes, one to set the Bit Protection bit to enable writes to the protected bit? Or can I simple write the protected bit, by setting the bit and (bitwise or) the protection bit?
Is there any other documentation regarding the USIC available, than the Reference Manual?
Cheers and thanks in advance,
Torsten
P.S. I tried the second approach and watched at channel->KSCFG with a debugger and got 0xffffffff.
does someone of you know how the Bit Protection configuration for the KSCFG register works?
The documentations says:
"1b ... is updated with the written value."
Does this 1 denotes the current state of the bit when writing to the configured bit or to value to be written when writing to the configured bit? Do I have to issue two writes, one to set the Bit Protection bit to enable writes to the protected bit? Or can I simple write the protected bit, by setting the bit and (bitwise or) the protection bit?
/* first write protection bit, then the protected bit; reset protection bit */
channel->KSCFG |= 1 << USIC_CH_KSCFG_BPMODEN_Pos;
channel->KSCFG |= 1 << USIC_CH_KSCFG_MODEN_Pos;
channel->KSCFG &= channel->KSCFG & ~USIC_CH_KSCFG_MODEN_Mask;
/* or simply write both flags at once */
channel->KSCFG |= ( 1 << USIC_CH_KSCFG_BPMODEN_Msk ) | ( 1 << USIC_CH_KSCFG_MODEN_Pos );
Is there any other documentation regarding the USIC available, than the Reference Manual?
Cheers and thanks in advance,
Torsten
P.S. I tried the second approach and watched at channel->KSCFG with a debugger and got 0xffffffff.
Labels
4 Replies
May 29, 2015
03:07 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 29, 2015
03:07 PM
BPMODEN and MODEN must be written simultaneously. As manual states MODEN is updated only when BPMODEN is 1.
rum
rum
Not applicable
May 30, 2015
01:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 30, 2015
01:21 AM
Thank you. But in my opinion one can read "MODEN is updated only when BPMODEN is 1" as: "BPMODEN must already be 1", not as "BPMODEN has to become 1 with the current write". So I think it's not very clear in the documentation.
cheers,
Torsten
cheers,
Torsten
Jun 01, 2015
08:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 01, 2015
08:21 PM
Hi Torsten,
I believe you have already seen also that both BPMODEN and MODEN must be written simultaneously, as mentioned by rum.
BPMODEN is a write-only bit and hence it takes effect only with each new write.
We will look at improving the wording at the very next opportunity.
Thanks for your inputs.
Regards,
Min Wei
I believe you have already seen also that both BPMODEN and MODEN must be written simultaneously, as mentioned by rum.
BPMODEN is a write-only bit and hence it takes effect only with each new write.
We will look at improving the wording at the very next opportunity.
Thanks for your inputs.
Regards,
Min Wei
Not applicable
Jun 02, 2015
12:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jun 02, 2015
12:31 AM
Hello Min Wei,
that would be fantastic. I think this construct is there so that it is possible to manipulate a single bit without the need for a read-modify-write cycle. If you would put an additional sentence into the document, why there is this protection bit, it would be very clear how to use it.
kind regards,
Torsten
that would be fantastic. I think this construct is there so that it is possible to manipulate a single bit without the need for a read-modify-write cycle. If you would put an additional sentence into the document, why there is this protection bit, it would be very clear how to use it.
kind regards,
Torsten