{"action":"created","issue":{"url":"https://api.github.com/repos/ARMmbed/atmel-rf-driver/issues/53","repository_url":"https://api.github.com/repos/ARMmbed/atmel-rf-driver","labels_url":"https://api.github.com/repos/ARMmbed/atmel-rf-driver/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/ARMmbed/atmel-rf-driver/issues/53/comments","events_url":"https://api.github.com/repos/ARMmbed/atmel-rf-driver/issues/53/events","html_url":"https://github.com/ARMmbed/atmel-rf-driver/issues/53","id":228654885,"number":53,"title":"ACK are missed on STM boards because of SPI exchange that are no fast enough","user":{"login":"pmancele","id":25764849,"avatar_url":"https://avatars3.githubusercontent.com/u/25764849?v=3","gravatar_id":"","url":"https://api.github.com/users/pmancele","html_url":"https://github.com/pmancele","followers_url":"https://api.github.com/users/pmancele/followers","following_url":"https://api.github.com/users/pmancele/following{/other_user}","gists_url":"https://api.github.com/users/pmancele/gists{/gist_id}","starred_url":"https://api.github.com/users/pmancele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmancele/subscriptions","organizations_url":"https://api.github.com/users/pmancele/orgs","repos_url":"https://api.github.com/users/pmancele/repos","events_url":"https://api.github.com/users/pmancele/events{/privacy}","received_events_url":"https://api.github.com/users/pmancele/received_events","type":"User","site_admin":false},"labels":[{"id":273989793,"url":"https://api.github.com/repos/ARMmbed/atmel-rf-driver/labels/mirrored","name":"mirrored","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-05-15T09:24:00Z","updated_at":"2017-05-15T11:49:21Z","closed_at":null,"body":"I'm opening this issue in continuity of this one where we identified the source of the probleme : https://github.com/ARMmbed/mbed-os/issues/4246\r\n\r\nThe problem is detailled in the last comments, starting with the comment of **kjbracey-arm** of may the 11th.\r\n\r\nTo summarize:\r\n\r\nAfter sending a frame to the ATMEL buffer, the MCU should wait for a TRX_END interrupt, indicating that the transfer is done.\r\nWhen this interrupt is detected, the MCU should change the state of the ATMEL 6LoWPAN chip to RX_AACK_ON within the 192µs, in order to be ready to receive the ACK.\r\n\r\nBut on STM MCU that we used (STM32L476ZG, NUCLEO_L476RG, NUCLEO_F401RE) the Time between 2 SPI exchange (CMD and response for example) is about 3 times longer on ST boards that the K64F.\r\nBecause of that we manage to realize the turnover in about 300µs which is too much ! So all the ACK are missed and the chip send every frame 5 times before giving up.\r\n\r\nBellow are some screenshot of the first SPI transaction that happen just after the TRX_END interrupt (when the board try to answer a PING). As you can see it is faster on the K64F. We can also see that it depends more on the systemcoreclock than the SPI frequency:\r\n\r\n* K64F at 120 MHZ, with SPI at 7.5 MHz:\r\n![k64f zoom](https://cloud.githubusercontent.com/assets/25764849/25958190/50442214-3670-11e7-879e-d6b3ba6e23e2.png)\r\n* STM32L476 at 60MHz, with SPI at 7.5MHz:\r\n![zoom stm32l476 at 60mhz spi at 7 5](https://cloud.githubusercontent.com/assets/25764849/25958222/61827c1a-3670-11e7-87d4-d15784b5da2e.png)\r\n* STM32L476 at 80MHz, with SPI at 5MHz:\r\n![zoom stm32l476 at 80mhz spi at 5](https://cloud.githubusercontent.com/assets/25764849/25958250/714452b8-3670-11e7-9e78-9dd4c1fec8eb.png)"},"comment":{"url":"https://api.github.com/repos/ARMmbed/atmel-rf-driver/issues/comments/301452474","html_url":"https://github.com/ARMmbed/atmel-rf-driver/issues/53#issuecomment-301452474","issue_url":"https://api.github.com/repos/ARMmbed/atmel-rf-driver/issues/53","id":301452474,"user":{"login":"ciarmcom","id":14747535,"avatar_url":"https://avatars3.githubusercontent.com/u/14747535?v=3","gravatar_id":"","url":"https://api.github.com/users/ciarmcom","html_url":"https://github.com/ciarmcom","followers_url":"https://api.github.com/users/ciarmcom/followers","following_url":"https://api.github.com/users/ciarmcom/following{/other_user}","gists_url":"https://api.github.com/users/ciarmcom/gists{/gist_id}","starred_url":"https://api.github.com/users/ciarmcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ciarmcom/subscriptions","organizations_url":"https://api.github.com/users/ciarmcom/orgs","repos_url":"https://api.github.com/users/ciarmcom/repos","events_url":"https://api.github.com/users/ciarmcom/events{/privacy}","received_events_url":"https://api.github.com/users/ciarmcom/received_events","type":"User","site_admin":false},"created_at":"2017-05-15T11:49:21Z","updated_at":"2017-05-15T11:49:21Z","body":"ARM Internal Ref: ONME-3074"}}
{"actor":{"display_login":"ciarmcom"}}