Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - Write to register (memory) problem with BeagleBone Black when using QNX RTOS: Page 1 of 2 (2 Items)
   
Write to register (memory) problem with BeagleBone Black when using QNX RTOS  
I try to configure pin gpmc_ad8 and gpmc_ad9 of BeagleBone Black(BBB) operating as an eHRPWM (PWMSS2) in QNX RTOS as 
shown in these lines of code below:
#define conf_gpmc_ad8 (0x44E10000+0x0820)
#define conf_gpmc_ad9 (0x44E10000+0x0824)
#define CONTROL_CONF_MUXMODE(n)        (n)

uintptr_t GPMC_AD8_REG = mmap_device_io(4, conf_gpmc_ad8);
if(GPMC_AD8_REG == MAP_DEVICE_FAILED)
{
    perror("Can't map GPMC_AD8_REG");
    return 0;
}
reg_val = CONTROL_CONF_MUXMODE(4);
out32 (GPMC_AD8_REG, reg_val);
usleep(10000);
stt_done = in32(GPMC_AD8_REG);
printf("CONTROL_CONF_GPMC_AD8 = %x (#4)\n", stt_done);

uintptr_t GPMC_AD9_REG = mmap_device_io(4, conf_gpmc_ad9);
if(GPMC_AD9_REG == MAP_DEVICE_FAILED)
{
    perror("Can't map GPMC_AD9_REG");
    return 0;
}
reg_val = CONTROL_CONF_MUXMODE(3);
out32 (GPMC_AD9_REG, reg_val);
usleep(10000);
stt_done = in32(GPMC_AD9_REG);
printf("CONTROL_CONF_GPMC_AD9 = %x (#4)\n", stt_done);

But I can not change the value of these registers as write value (show on picture 1). I dont know why, the reason can be
 my wrong procedure or other problem. Somebody who have been worked with Beagle and QNX can help me.

PS: If I use pin lcd_data0 and lcd_data1, these values are still wrong. While other registers I configured for system 
clock or PWMSS2 are right. (show in picture 2)

Attachment: Image problem2.jpg 193.46 KB Image problem.jpg 164.27 KB