Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Help: volatile variable versus volatile array for ISR access

2007-11-03 by Cat C

Hi,

I have this group of variables that I'm updating inside an ISR.

It works fine if I declare like this:
volatile uint8_t iCh1 = 0, iCh2 = 0, iCh3 = 0, iCh4 = 0, iCh5 = 0, iCh6 = 0;

but not if I change them to an array like this:

volatile uint8_t iCh[6] = {0, 0, 0, 0, 0, 0};

I'm thinking that maybe in the second case somehow only the pointer becomes 
volatile, but... what can I do?

Thanks,

Cat

_________________________________________________________________
Send a smile, make someone laugh, have some fun! Check out 
freemessengeremoticons.ca

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.