ΣSigmaStudio Ask AI Русский Log in

can we access individual register bit in C for blackfin? "individual bit =1"

Processors & DSP blackfin Sep 6, 2017 00:00 4 replies Original on forum ↗
Subscribe
blackfin Question
Sep 6, 2017 00:00

an we access individual register bit in C for blackfin Visual C ++?

for example, "individual bit =1"

ADIApproved Reply
Sep 15, 2017 00:00

Yes, it is possible to access the individual register bit in C for Blackfin.

Is the Visual C ++ a typo? Actually, VisualDSP++ or CCES can be used as development and Debugging Environment.

ADIApproved Reply
Sep 15, 2017 00:00

Hello,

VisualDSP++ installation provides header files for all the processors which has memory map definition for all System memory mapped registers(MMR) , Core registers and corresponding bit definitions.

Just to be clear, the header file should be located at "<VisualDSP Install path>\Blackfin\Include

For instance, if you use BF527 and need to access bits in the MMR you can include the below header files and write the program as shown.

#include <cdefBF527.h>
#include <ccblkfn.h>

*pPORTFIO_DIR |= (PF0 | PF1 | PF2); // To set the bits in the PORTFIO_DIR register

*pPORTFIO_DIR &= ~(PF0 | PF1 | PF2); // To clear the bits in the PORTFIO_DIR register

You can find code examples in the VisualDSP++ installation. For instance, code example for BF527-EZ-Kit can be found in the following path--> <VisualDSP Install path>\Blackfin\Examples\ADSP-BF527 EZ-KIT Lite

Hope this helps

BR,

Jithul

blackfin Reply
Sep 15, 2017 00:00

VisualDSP++

Can you show me ? individual bit=0/1;

I do not see we can in VisualDSP++ without doing a STRUCT definition with bitwise field.

Thanks

EZAdministrator Reply
Aug 2, 2018 00:00

This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.

Thank you,
EZ Admin