{"action":"created","comment":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/comments/192727612","pull_request_review_id":125556032,"id":192727612,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5MjcyNzYxMg==","diff_hunk":"@@ -117,7 +117,14 @@ void stm32_i2c_event_isr(void *arg)\n error:\n \tLL_I2C_DisableIT_TX(i2c);\n \tLL_I2C_DisableIT_RX(i2c);\n-\tdata->current.is_err = 1;\n+\n+\tif (LL_I2C_IsActiveFlag_NACK(i2c)) {\n+\t\tLL_I2C_ClearFlag_NACK(i2c);\n+\t\tdata->current.is_nack = 1;\n+\t} else {\n+\t\tdata->current.is_err = 1;\n+\t}","path":"drivers/i2c/i2c_ll_stm32_v2.c","position":11,"original_position":11,"commit_id":"2252e361b490d3f0263d0983d8676a6843d9d065","original_commit_id":"2252e361b490d3f0263d0983d8676a6843d9d065","user":{"login":"superna9999","id":492099,"node_id":"MDQ6VXNlcjQ5MjA5OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/492099?v=4","gravatar_id":"","url":"https://api.github.com/users/superna9999","html_url":"https://github.com/superna9999","followers_url":"https://api.github.com/users/superna9999/followers","following_url":"https://api.github.com/users/superna9999/following{/other_user}","gists_url":"https://api.github.com/users/superna9999/gists{/gist_id}","starred_url":"https://api.github.com/users/superna9999/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/superna9999/subscriptions","organizations_url":"https://api.github.com/users/superna9999/orgs","repos_url":"https://api.github.com/users/superna9999/repos","events_url":"https://api.github.com/users/superna9999/events{/privacy}","received_events_url":"https://api.github.com/users/superna9999/received_events","type":"User","site_admin":false},"body":"This does not seem to be in the right place in the event handler, it should be handled before looking at the message it self.","created_at":"2018-06-04T12:45:39Z","updated_at":"2018-06-04T12:45:40Z","html_url":"https://github.com/zephyrproject-rtos/zephyr/pull/7626#discussion_r192727612","pull_request_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/7626","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/comments/192727612"},"html":{"href":"https://github.com/zephyrproject-rtos/zephyr/pull/7626#discussion_r192727612"},"pull_request":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/7626"}}},"pull_request":{"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/7626","id":188739513,"node_id":"MDExOlB1bGxSZXF1ZXN0MTg4NzM5NTEz","html_url":"https://github.com/zephyrproject-rtos/zephyr/pull/7626","diff_url":"https://github.com/zephyrproject-rtos/zephyr/pull/7626.diff","patch_url":"https://github.com/zephyrproject-rtos/zephyr/pull/7626.patch","issue_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/7626","number":7626,"state":"open","locked":false,"title":"i2c: i2c_ll_stm32_v2: fix NACK handling for STM32L4","user":{"login":"vaussard","id":974146,"node_id":"MDQ6VXNlcjk3NDE0Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/974146?v=4","gravatar_id":"","url":"https://api.github.com/users/vaussard","html_url":"https://github.com/vaussard","followers_url":"https://api.github.com/users/vaussard/followers","following_url":"https://api.github.com/users/vaussard/following{/other_user}","gists_url":"https://api.github.com/users/vaussard/gists{/gist_id}","starred_url":"https://api.github.com/users/vaussard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaussard/subscriptions","organizations_url":"https://api.github.com/users/vaussard/orgs","repos_url":"https://api.github.com/users/vaussard/repos","events_url":"https://api.github.com/users/vaussard/events{/privacy}","received_events_url":"https://api.github.com/users/vaussard/received_events","type":"User","site_admin":false},"body":"On STM32L4, a NACK on the I2C bus triggers an I2C event interrupt (see\r\nfor example Figure 420 in the STM32L4x6 TRM). But the current logic\r\nexpects an I2C error interrupt. As a result, the NACK interrupt is\r\nnot acknowledged and leads to an IRQ storm which freezes the system.\r\n\r\nFactorize the NACK handling code to share it between event and error\r\nISRs, then call it from the event ISR if we compile for STM32L4.","created_at":"2018-05-17T13:36:35Z","updated_at":"2018-06-04T12:45:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82ca79241d599b4e765db6203710341d7f6ed84d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":723804881,"node_id":"MDU6TGFiZWw3MjM4MDQ4ODE=","url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels/STM32","name":"STM32","color":"39a9db","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/7626/commits","review_comments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/7626/comments","review_comment_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/7626/comments","statuses_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/statuses/2252e361b490d3f0263d0983d8676a6843d9d065","head":{"label":"vaussard:i2c_stm32_nack_on_l4","ref":"i2c_stm32_nack_on_l4","sha":"2252e361b490d3f0263d0983d8676a6843d9d065","user":{"login":"vaussard","id":974146,"node_id":"MDQ6VXNlcjk3NDE0Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/974146?v=4","gravatar_id":"","url":"https://api.github.com/users/vaussard","html_url":"https://github.com/vaussard","followers_url":"https://api.github.com/users/vaussard/followers","following_url":"https://api.github.com/users/vaussard/following{/other_user}","gists_url":"https://api.github.com/users/vaussard/gists{/gist_id}","starred_url":"https://api.github.com/users/vaussard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaussard/subscriptions","organizations_url":"https://api.github.com/users/vaussard/orgs","repos_url":"https://api.github.com/users/vaussard/repos","events_url":"https://api.github.com/users/vaussard/events{/privacy}","received_events_url":"https://api.github.com/users/vaussard/received_events","type":"User","site_admin":false},"repo":{"id":89909145,"node_id":"MDEwOlJlcG9zaXRvcnk4OTkwOTE0NQ==","name":"zephyr","full_name":"vaussard/zephyr","owner":{"login":"vaussard","id":974146,"node_id":"MDQ6VXNlcjk3NDE0Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/974146?v=4","gravatar_id":"","url":"https://api.github.com/users/vaussard","html_url":"https://github.com/vaussard","followers_url":"https://api.github.com/users/vaussard/followers","following_url":"https://api.github.com/users/vaussard/following{/other_user}","gists_url":"https://api.github.com/users/vaussard/gists{/gist_id}","starred_url":"https://api.github.com/users/vaussard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vaussard/subscriptions","organizations_url":"https://api.github.com/users/vaussard/orgs","repos_url":"https://api.github.com/users/vaussard/repos","events_url":"https://api.github.com/users/vaussard/events{/privacy}","received_events_url":"https://api.github.com/users/vaussard/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vaussard/zephyr","description":"Primary GIT Repository for the Zephyr Project","fork":true,"url":"https://api.github.com/repos/vaussard/zephyr","forks_url":"https://api.github.com/repos/vaussard/zephyr/forks","keys_url":"https://api.github.com/repos/vaussard/zephyr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vaussard/zephyr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vaussard/zephyr/teams","hooks_url":"https://api.github.com/repos/vaussard/zephyr/hooks","issue_events_url":"https://api.github.com/repos/vaussard/zephyr/issues/events{/number}","events_url":"https://api.github.com/repos/vaussard/zephyr/events","assignees_url":"https://api.github.com/repos/vaussard/zephyr/assignees{/user}","branches_url":"https://api.github.com/repos/vaussard/zephyr/branches{/branch}","tags_url":"https://api.github.com/repos/vaussard/zephyr/tags","blobs_url":"https://api.github.com/repos/vaussard/zephyr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vaussard/zephyr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vaussard/zephyr/git/refs{/sha}","trees_url":"https://api.github.com/repos/vaussard/zephyr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vaussard/zephyr/statuses/{sha}","languages_url":"https://api.github.com/repos/vaussard/zephyr/languages","stargazers_url":"https://api.github.com/repos/vaussard/zephyr/stargazers","contributors_url":"https://api.github.com/repos/vaussard/zephyr/contributors","subscribers_url":"https://api.github.com/repos/vaussard/zephyr/subscribers","subscription_url":"https://api.github.com/repos/vaussard/zephyr/subscription","commits_url":"https://api.github.com/repos/vaussard/zephyr/commits{/sha}","git_commits_url":"https://api.github.com/repos/vaussard/zephyr/git/commits{/sha}","comments_url":"https://api.github.com/repos/vaussard/zephyr/comments{/number}","issue_comment_url":"https://api.github.com/repos/vaussard/zephyr/issues/comments{/number}","contents_url":"https://api.github.com/repos/vaussard/zephyr/contents/{+path}","compare_url":"https://api.github.com/repos/vaussard/zephyr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vaussard/zephyr/merges","archive_url":"https://api.github.com/repos/vaussard/zephyr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vaussard/zephyr/downloads","issues_url":"https://api.github.com/repos/vaussard/zephyr/issues{/number}","pulls_url":"https://api.github.com/repos/vaussard/zephyr/pulls{/number}","milestones_url":"https://api.github.com/repos/vaussard/zephyr/milestones{/number}","notifications_url":"https://api.github.com/repos/vaussard/zephyr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vaussard/zephyr/labels{/name}","releases_url":"https://api.github.com/repos/vaussard/zephyr/releases{/id}","deployments_url":"https://api.github.com/repos/vaussard/zephyr/deployments","created_at":"2017-05-01T08:34:31Z","updated_at":"2017-05-01T08:35:08Z","pushed_at":"2018-05-25T18:35:56Z","git_url":"git://github.com/vaussard/zephyr.git","ssh_url":"git@github.com:vaussard/zephyr.git","clone_url":"https://github.com/vaussard/zephyr.git","svn_url":"https://github.com/vaussard/zephyr","homepage":"http://zephyrproject.org/doc","size":111480,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zephyrproject-rtos:master","ref":"master","sha":"ad6b8904713e6d436c1a4ce1bc83bdba5e9fcc3b","user":{"login":"zephyrproject-rtos","id":19595895,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NTk1ODk1","avatar_url":"https://avatars2.githubusercontent.com/u/19595895?v=4","gravatar_id":"","url":"https://api.github.com/users/zephyrproject-rtos","html_url":"https://github.com/zephyrproject-rtos","followers_url":"https://api.github.com/users/zephyrproject-rtos/followers","following_url":"https://api.github.com/users/zephyrproject-rtos/following{/other_user}","gists_url":"https://api.github.com/users/zephyrproject-rtos/gists{/gist_id}","starred_url":"https://api.github.com/users/zephyrproject-rtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zephyrproject-rtos/subscriptions","organizations_url":"https://api.github.com/users/zephyrproject-rtos/orgs","repos_url":"https://api.github.com/users/zephyrproject-rtos/repos","events_url":"https://api.github.com/users/zephyrproject-rtos/events{/privacy}","received_events_url":"https://api.github.com/users/zephyrproject-rtos/received_events","type":"Organization","site_admin":false},"repo":{"id":59771425,"node_id":"MDEwOlJlcG9zaXRvcnk1OTc3MTQyNQ==","name":"zephyr","full_name":"zephyrproject-rtos/zephyr","owner":{"login":"zephyrproject-rtos","id":19595895,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE5NTk1ODk1","avatar_url":"https://avatars2.githubusercontent.com/u/19595895?v=4","gravatar_id":"","url":"https://api.github.com/users/zephyrproject-rtos","html_url":"https://github.com/zephyrproject-rtos","followers_url":"https://api.github.com/users/zephyrproject-rtos/followers","following_url":"https://api.github.com/users/zephyrproject-rtos/following{/other_user}","gists_url":"https://api.github.com/users/zephyrproject-rtos/gists{/gist_id}","starred_url":"https://api.github.com/users/zephyrproject-rtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zephyrproject-rtos/subscriptions","organizations_url":"https://api.github.com/users/zephyrproject-rtos/orgs","repos_url":"https://api.github.com/users/zephyrproject-rtos/repos","events_url":"https://api.github.com/users/zephyrproject-rtos/events{/privacy}","received_events_url":"https://api.github.com/users/zephyrproject-rtos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zephyrproject-rtos/zephyr","description":"Primary GIT Repository for the Zephyr Project","fork":false,"url":"https://api.github.com/repos/zephyrproject-rtos/zephyr","forks_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/forks","keys_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/teams","hooks_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/hooks","issue_events_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/events{/number}","events_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/events","assignees_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/assignees{/user}","branches_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/branches{/branch}","tags_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/tags","blobs_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/git/refs{/sha}","trees_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/statuses/{sha}","languages_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/languages","stargazers_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/stargazers","contributors_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/contributors","subscribers_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/subscribers","subscription_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/subscription","commits_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/commits{/sha}","git_commits_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/git/commits{/sha}","comments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/comments{/number}","issue_comment_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/comments{/number}","contents_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/contents/{+path}","compare_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/merges","archive_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/downloads","issues_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues{/number}","pulls_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls{/number}","milestones_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/milestones{/number}","notifications_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/labels{/name}","releases_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/releases{/id}","deployments_url":"https://api.github.com/repos/zephyrproject-rtos/zephyr/deployments","created_at":"2016-05-26T17:54:19Z","updated_at":"2018-06-04T12:26:23Z","pushed_at":"2018-06-04T12:43:04Z","git_url":"git://github.com/zephyrproject-rtos/zephyr.git","ssh_url":"git@github.com:zephyrproject-rtos/zephyr.git","clone_url":"https://github.com/zephyrproject-rtos/zephyr.git","svn_url":"https://github.com/zephyrproject-rtos/zephyr","homepage":"https://docs.zephyrproject.org","size":112349,"stargazers_count":880,"watchers_count":880,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":639,"mirror_url":null,"archived":false,"open_issues_count":907,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":639,"open_issues":907,"watchers":880,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/7626"},"html":{"href":"https://github.com/zephyrproject-rtos/zephyr/pull/7626"},"issue":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/7626"},"comments":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/issues/7626/comments"},"review_comments":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/7626/comments"},"review_comment":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/pulls/7626/commits"},"statuses":{"href":"https://api.github.com/repos/zephyrproject-rtos/zephyr/statuses/2252e361b490d3f0263d0983d8676a6843d9d065"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"superna9999"}}