Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8332193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:39:11+00:00 2026-06-09T02:39:11+00:00

In the debugger, I see that the pointer has the right address that I

  • 0

In the debugger, I see that the pointer has the right address that I want and the variables
UBRR_VAL, val1, val2 hold the passed in values. Only problem is that the variables inside the struct _UBRRH, _UBRRL, _UCSRA and _UCSRB are not changing. Below you will find code snippets for reference. Thanks.

This is how the struct is defined

typedef uint8_t volatile DEVICEREGISTER;

typedef struct
{
    DEVICEREGISTER _UDR;
    DEVICEREGISTER _UCSRA;
    DEVICEREGISTER _UCSRB;
    DEVICEREGISTER _UBRRL;
} uart_register_t;

#define _USART (uart_register_t*) 0x2C

This is how I am calling the function.

uart_init(UBRR_VAL, 0, (1<<_TXC)|(1<<_RXC), _USART); // initialize the uart for outputting and inputting.

Below is the function definition.

void uart_init(uint8_t UBRR_VAL, uint8_t val1, uint8_t val2, uart_register_t *pointer)
{
    pointer->_UBRRL = UBRR_VAL;                     
    pointer->_UCSRA = val1; 
    pointer->_UCSRB = val2;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T02:39:13+00:00Added an answer on June 9, 2026 at 2:39 am

    I appreciate everybody’s feedback on this question. It helped me narrow down the issue and finally resolved it. It turns out I had the variables inside the struct in the wrong sequential order. I fixed that problem now. Thank you very much for helping me resolve this issue!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to see the value of a variable, but the debugger shows me
I've tried running the debugger in VS. I see the error list, but I
I'm following https://github.com/joyent/node/wiki/Using-Eclipse-as-Node-Applications-Debugger and leaves me with questions How can I see what variables
The Chrome debugger tells me that it found for example 42 occurrences of a
I have a piece of mature geospatial software that has recently had areas rewritten
I have a virtual class that has been derived from a non virtual class.
Why does it happen that a command line argument passed to a Java class
I recently discovered that Delphi has a global variable called ReportMemoryLeaksOnShutdown, when set to
I have an xsl template that I want to call to put into an
My debugger keep jumping into debugging the IL instead of jumping to debug code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.