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
Continue with Facebook
Continue with Google
or use

What is the capital of Egypt? ( Cairo )

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
Continue with Facebook
Continue with Google
or use

What is the capital of Egypt? ( Cairo )

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Volt.Tech

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 question.

Continue with Facebook
Continue with Google
or use

What is the capital of Egypt? ( Cairo )

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.

volt.tech Logo volt.tech Logo
Sign InSign Up

volt.tech

volt.tech Navigation

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

Mobile menu

Close
Ask a Question
  • Tags
  • Category
    • Amplifiers
    • Passives & Protection
    • Clocks & Timing
    • Diodes & Rectifiers
    • FPGAs & PLDs
    • Interface ICs & Transceivers
    • LEDs & Optoelectronics
    • Memories
    • MEMS & Sensors
    • Microcontroller
    • Power Management
    • RF & Microwave
    • Security & Smart Card
    • Motor Drivers
    • Wireless Connectivity
  • Groups
  • Add group
  • Badges
  • Help
  • Home
  • About Us
  • Contact Us
Home/Questions/Q 1762
Next
Linto
  • 0
Linto
Asked: August 2, 20222022-08-02T15:42:22+05:30 2022-08-02T15:42:22+05:30In: Microcontroller

SCI_SPI delays

  • 0

I am implementing some low level functions for the library (for the CLRC663 NFC reader chip) I am going to write, based on  that Simple SPI communication, but I see something weird.

void CLRC663_write_regs(uint8_t reg, const uint8_t* values, uint8_t len) {

uint8_t tempBuf[len+1], i;

tempBuf[0] = reg;
for (i = 1; i < len+2; i++) tempBuf[i] = values[i-1];

g_transfer_complete = false;
CLRC663_enable();

R_SCI_SPI_Write(&g_spi0_ctrl, &tempBuf, sizeof(tempBuf), SPI_BIT_WIDTH_8_BITS);
while (!g_transfer_complete);

CLRC663_disable();
}

and calling it on the main with this:

CLRC663_write_regs(0x02,&g_master_tx_buff,4);

(consider that g_master_tx_buff is filled with  0xAA, 0xBB, 0xCC, 0xDD)

I have these waveforms:

Consider that the SCI callback is simply:

void sci_spi_callback(spi_callback_args_t *p_args) {
if (SPI_EVENT_TRANSFER_COMPLETE == p_args->event) {
g_master_event_flag = SPI_EVENT_TRANSFER_COMPLETE;
g_transfer_complete = true;
} else {
/* Updating the flag here to capture and handle all other error events */
g_master_event_flag = SPI_EVENT_TRANSFER_ABORTED;
}
}

and the enable/disable function are simple i/O controls

void CLRC663_enable (void) {
R_IOPORT_PinWrite(&g_ioport_ctrl, SPI_SSLA0, BSP_IO_LEVEL_LOW);
}

void CLRC663_disable (void) {
R_IOPORT_PinWrite(&g_ioport_ctrl, SPI_SSLA0, BSP_IO_LEVEL_HIGH);
}

The question is: why I got such delays after CS goes low? And why I got about the same delay when I put the CS high?

mcu
  • 0 0 Answers
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    Related Questions

    • How to block the R_SPI_WriteRead Function Easily?
    • How to Set Trigger ADC from GPT?
    • How to Use SPI_Transmit NMI_HANDLER in RA6M3 Board?
    • How to Connect System Platform File with AN599 MCU7 Baseboard?
    • What is straightforward and more logical methods for RA6M3 Video Record?

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Continue with Facebook
    Continue with Google
    or use

    What is the capital of Egypt? ( Cairo )

    Forgot Password?

    Need An Account, Sign Up Here
    Continue with Facebook
    Continue with Google

    Sidebar

    Ask A Question

    Related Questions

    • Julian White

      How to Set Trigger ADC from GPT?

      • 1 Answer
    • nidhi singh

      How to Use SPI_Transmit NMI_HANDLER in RA6M3 Board?

      • 1 Answer
    • vikas Nagpal

      How to Set Default Toolchain with FSP4.3.0 without any Error ...

      • 1 Answer
    • ashishgawade

      How to set the Heap and Stack Sizes in Simple ...

      • 1 Answer
    • nidhi singh

      How Virtual EEPROM and RA2E1 Product work Together?

      • 1 Answer

    Stats

    • Questions 418
    • Answers 405
    • Comments 0
    • Best Answers 9
    • Popular
    • Answers
    • Manoj

      Configuration using .dp vision in Infineon XDPL series IC .

      • 5 Answers
    • Linto

      Renesas RL78/G14 ADC interface code

      • 4 Answers
    • Julian White
      Julian White added an answer Hello Alex, By default, the perpetration of the drivers in… June 7, 2023 at 9:52 am
    • ashishgawade
      ashishgawade added an answer Hi, For enabling the automatic password sequencing you can write… June 2, 2023 at 11:23 am
    • ashishgawade
      ashishgawade added an answer Hello, C19 (parallel to Riseth resistor) marked as NC in… May 31, 2023 at 11:41 am
    • Alex thomas
      Alex thomas added an answer It will not. Note that the 3.3 V LDO doesn't"… May 29, 2023 at 10:15 am
    • nidhi singh
      nidhi singh added an answer Hello, Thanks for reaching out to Volt Tech Engineering Community.… May 26, 2023 at 10:30 am

    Users

    chicagosecuritysystem

    chicagosecuritysystem

    • 0 Questions
    • 0 Answers
    ellasmith

    ellasmith

    • 0 Questions
    • 0 Answers
    sachinsharma

    sachinsharma

    • 0 Questions
    • 0 Answers

    Explore

    • Tags
    • Category
      • Amplifiers
      • Passives & Protection
      • Clocks & Timing
      • Diodes & Rectifiers
      • FPGAs & PLDs
      • Interface ICs & Transceivers
      • LEDs & Optoelectronics
      • Memories
      • MEMS & Sensors
      • Microcontroller
      • Power Management
      • RF & Microwave
      • Security & Smart Card
      • Motor Drivers
      • Wireless Connectivity
    • Groups
    • Add group
    • Badges
    • Help

    Footer

    volt.tech

    Volt.Tech

    Find your spark

    About Us

    • About Us
    • Contact Us
    • Groups

    Legal Stuff

    • Privacy Policy
    • Faqs

    Follow

    © 2022 volt.tech. All Rights Reserved
    With Love by volt.tech.

    Go to mobile version

    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.