Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I2C fix: Idle_delay added in between commands, SPI slave Fix: Format function modified and SPISLAVE enabled #3611

Closed
wants to merge 1 commit into from

Conversation

pradeep-gr
Copy link
Contributor

@pradeep-gr pradeep-gr commented Jan 19, 2017

Description

I2C fix: Idle_delay added in between commands, SPI slave Fix: Format function modified and SPISLAVE enabled

Status

READY

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 19, 2017

@pradeep-gr Please fill in the template for pull requests to introduce this changeset. It helps to review , to have an overview . Thanks! (You can edit the message above).


#define I2C_API_STATUS_SUCCESS 0
#define PAD_REG_ADRS_BYTE_SIZE 4

#define SEND_COMMAND(cmd) while(!I2C_FIFO_EMPTY); wait_us(1); obj->membase->CMD_REG = cmd;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@0xc0170 Do we have a policy for using the wait* api in the hal? Is it fine to use or do we typically just busy loop instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used in HAL for some targets .

I wonder why this timeout is needed .

@0xc0170
Copy link
Contributor

0xc0170 commented Jan 30, 2017

Please split this commit into 3 separate commits, they are not related, thus is hard to review and integrate.

headlines could be:

  • i2c fix with wait()
  • spi slave enable
  • spi slave fix

For instance, I don't understand why wait is being added, the commit message shall include the reasoning, as it's not clear what it fixes and why 1 us delay for a command.

How was this tested?

@maclobdell
Copy link
Contributor

Hi Pradeep, as Martin mentioned, it is very helpful to get a description of the change (overview of what is changed and the reason) and group logically separate changes into separate commits. We just want to do a quick review of each one separately to check for known gotchas or other potential issues and collaborate with you efficiently. We really appreciate your expertise and help on this.

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 1, 2017

We can split that commit as its one, should be quick. However I would like to get more details for this commit to be able to understand it better. Can you please @pradeep-gr provide some details (I asked some questions above)

@pradeep-gr
Copy link
Contributor Author

@0xc0170 @maclobdell
1us is I2C_Idle_delay between each command as Orion I2C FIFO is too fast to push commands out.

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 8, 2017

/morph test

@0xc0170
Copy link
Contributor

0xc0170 commented Feb 8, 2017

Note: for the integration we shall provide better commit message

@mbed-bot
Copy link

mbed-bot commented Feb 8, 2017

Result: SUCCESS

Your command has finished executing! Here's what you wrote!

/morph test

Output

mbed Build Number: 1527

All builds and test passed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants